I have a nested table, when applying a style to the outer table, it also applys to the inner table ad for the life of me I cant figure out how to stop it :S e.g.:
<table id="outter">
<tr>
<td>Hello</td>
<td>
<table class="inner">
<tr>
<td>Goodbye</td>
</tr>
</table>
</td>
</tr>
</table>
table#outter
{
text-align:left;
vertical-align:top;
}
table#outter tr td
{
border-style:solid;
border-width: 1px;
border-color:rgb(175,175,175);
border-collapse: collapse;
border-spacing:0;
}
I thought by ading styles to the inner table it would remove the inheritance but, apparently not!
table.inner
{
padding-left:25px;
text-align:left;
vertical-align:top;
}
table.inner tr td
{
text-align:left;
vertical-align:top;
border-style:solid;
border-width: 0px;
}
It's been a while since I have done CSS and HTML but I seem to remember that you could use '>' to tell the table to only apply the style to its own tr, td?
Basically because I set a border on the outter table, it sets one on the inner table too and I do not want one on the inner table. Can anyone help?
<table id="outter">
<tr>
<td>Hello</td>
<td>
<table class="inner">
<tr>
<td>Goodbye</td>
</tr>
</table>
</td>
</tr>
</table>
table#outter
{
text-align:left;
vertical-align:top;
}
table#outter tr td
{
border-style:solid;
border-width: 1px;
border-color:rgb(175,175,175);
border-collapse: collapse;
border-spacing:0;
}
I thought by ading styles to the inner table it would remove the inheritance but, apparently not!
table.inner
{
padding-left:25px;
text-align:left;
vertical-align:top;
}
table.inner tr td
{
text-align:left;
vertical-align:top;
border-style:solid;
border-width: 0px;
}
It's been a while since I have done CSS and HTML but I seem to remember that you could use '>' to tell the table to only apply the style to its own tr, td?
Basically because I set a border on the outter table, it sets one on the inner table too and I do not want one on the inner table. Can anyone help?
Last edited: