Solved

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

Posted on 2014-03-17
2
185 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
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…

744 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

13 Experts available now in Live!

Get 1:1 Help Now