Solved

Bold certain row/colum in <table> (Bootstrap3)

Posted on 2014-03-17
2
206 Views
Last Modified: 2014-03-19
Hi,

I want to bold the top and bottom rows and the first and last columns of a table. What is the best way to achieve this with boostrap 3?

http://jsfiddle.net/2nG8C/

<table class="table">
	<thead>
		<tr>
			<th></th>
			<th>1</th>
			<th>2</th>
			<th>3</th>
			<th>4</th>
			<th>5</th>
			<th>6</th>
			<th>7</th>
			<th>8</th>
			<th>Total</th>
		</tr>
	</thead>
	<tbody>
		<tr><td>A</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
		<tr><td>B</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
		<tr><td>C</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
		<tr><td>D</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
		<tr><td>E</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
		<tr><td>F</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
		<tr><td>G</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
		<tr><td>Total</td><td>0</td><td>0</td><td>0</td><td>0</td><td>0</td></tr>
	</tbody>
</table>

Open in new window


Thank you
0
Comment
Question by:mhdi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 53

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 250 total points
ID: 39934401
The sample in your question it would be
tr:first-child td{font-weight:bold;}
tr:last-child td{font-weight:bold;}

Open in new window

http://jsbin.com/yohak/1/edit?html,css,output

The sample in your fiddle will be similar. You can use first-child/last-child based on .row for instance. Or the container for a list of rows.
0
 
LVL 58

Accepted Solution

by:
Gary earned 250 total points
ID: 39934430
You would also need

tr td:first-child{font-weight:bold;}
tr td:last-child{font-weight:bold;}

Open in new window

with Scott's solution
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
What kind of framework must i use to do that ? 2 47
Html using "Or" in condition 3 41
CSS question 16 62
Jquery syntax 12 29
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question