Solved

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

Posted on 2014-03-17
2
192 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
2 Comments
 
LVL 52

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Basic JavaScript Question 3 38
Enter key on html form page 11 48
Put glyphicon in my input button 4 28
help squeezing some space out in this site 9 16
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)

895 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now