Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2014-03-17
2
Medium Priority
?
216 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 1000 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 1000 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

Industry Leaders: 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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

705 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