...

View Full Version : Table formatting



nick2price
06-18-2012, 11:18 PM
Hi guys. Just trying to work out why the following applies now formatting to my table rows

<tr>
<td>business class flights to <b>Abu Dhabi</b><span>from <b>1185</b></span></td>
<td>business class flights to <b>Miami</b><span>from <b>1365</b></span></td>
</tr>

I am basically trying to recreate the following
http://s12.postimage.org/iimv2c7w9/pricing.jpg (http://postimage.org/image/iimv2c7w9/)

I thought a table would be the best way to achieve this, but what I am trying above is to get the text to appear like it does in the image.

Cheers

Nick

bigcasey123
06-18-2012, 11:29 PM
Add this in your stylesheet


td {
border:1px solid gray;
background-color:gray;
}

Should give you the box's but you just got to get the colors right.

nick2price
06-18-2012, 11:34 PM
I actually have my table set up like so

<table id="price-table">
<tr>
<td>business class flights to <b>Abu Dhabi</b><span>from <b>1185</b></span></td>
<td>business class flights to <b>Miami</b><span>from <b>1365</b></span></td>
</tr>

How do I do it so I target this tables td, as I dont want to just use td as this will affect other tables. I have tried without success the following

#price-table td{
border:1px solid gray;
background-color:gray;
}


Cheers

bigcasey123
06-18-2012, 11:42 PM
I found away to get this to work, here is the code.


<td class="name">business class flights to <b>Abu Dhabi</b><span>from <b>1185</b></span></td>

<td class="name2">business class flights to <b>Miami</b><span>from <b>1365</b></span></td>

Css part



.name{
border:1px solid gray;
background-color:gray;
}
.name2{
border:1px solid gray;
background-color:gray;
}


Change the "name" to what ever you want it to be named. Their might be an easier way to do this but this is the only way i know.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum