PDA

View Full Version : tables


fodder
05-28-2006, 05:51 PM
i have two tables in a page just above each other:

i have been trying to make the properties of the tables to be the exact same size so have been setting the td and th to a size but only the first table takes up the values.

---
css code:
th {
font-size: 100%;
text-decoration: underline;
}

td {
font-size: 90%;
}

--------
html:

<table>
<tr>
<th width="133">Date</th>
<th width="145">Venue</th>
<th width="76">Location</th>
</tr>
<tr>
<td><div align="center">July 26th 2006</div></td>
<td><div align="center">The Caernarvon Castle</div></td>
<td><div align="center">London</div></td>
</tr>
</table>

<h2>Gig Archive<h2>
<table>
<tr>
<th width="133"><span class="style2">Date</span></th>
<th width="145"><span class="style2">Venue</span></th>
<th width="76"><span class="style2">Location</span></th>
</tr>
<tr>
<td><div align="center" class="style4">February 8th 2006</div></td>
<td><div align="center" class="style4"><a target"_blank" href"http:www.larkinthepark.co.uk">Lark in the Park</a></div></td>
<td><div align="center" class="style4">London</div></td>
</tr>
<tr>
<td><div align="center" class="style4">March 6th 2006</div></td>
<td><div align="center" class="style4"><a target"_blank" href"http:www.larkinthepark.co.uk">Lark in the Park</a></div></td>
<td><div align="center" class="style4">London</div></td>
</tr>
<tr>
<td><div align="center" class="style4">April 4th 2006</div></td>
<td><div align="center" class="style4"><a target"_blank" href"http:www.pleasureunitbar.com">The Pleasure Unit</a></div></td>
<td><div align="center" class="style4">London</div></td>
</tr>
<tr>
<td><div align="center" class="style4">April 5th 2006</div></td>
<td><div align="center" class="style4"><a target"_blank" href"http:www.larkinthepark.co.uk">Lark in the Park</a></div></td>
<td><div align="center" class="style4">London</div></td>
</tr>
</table>

johnph77
05-28-2006, 08:00 PM
If all of your "td" cells will have center alignment then set that property in your css file. In your td specs add:
text-align: center;
If that won't be the case then use:
<td align="center">
Forget about the "div"s.