hi!
i’m just trying to format a table using the following css:
table.nice td
{
vertical-align: top;
text-align: justify;
border: 1px solid #aaa;
background: #ffd;
padding: 5px;
}
table.nice tr.header td
{
text-align: center;
font-weight: bold;
background: #eec;
}
which pads most table cells and allows me to add a slightly different header row (could use th but then i’d have to get rid of the font-changes, etc that th brings with it). so i’m using this something like:
<table class=”nice”>
<tr class=”header”><td>Name</td><td>Occupation</td></tr>
<tr><td>Rigadon</td><td>Professional Numpty</td></tr>
</table>
my problem is that if one of the cells includes another table then all the cells of this ‘sub-table’ take on the same ‘nice’ style defined for the original table! adding a style to the sub-table doesn’t seem to have any effect either…
this isn’t the behaviour i was expecting though i suppose it does make sense – can anyone point me in the right direction please??