Forum Moderators: not2easy
I know how to do this with CSS by assigning a class to each TD and defining that class with the desired border characteristics.
In some situations my agent is having a problem with the size of HTML and class="cellborder" times 600 cells equals my best opportunity to reduce the size of the dynamically generated HTML.
One option would be to skip the "cellborder" class and instead define TD to have these border characteristics. This is unacceptable because it would add a top and bottom border to ALL cells on the page and I have several other tables which need to have no border.
What I would like is for the Table to somehow identify that all of its cells are members of a particular class or have a particular style.
Is there any way that a TD can inherit its class from the Table?
Thanks in advance,
Marc Robson
PS - this might be a pretty basic question, I am still learning CSS
The easiest way to do this is to assign a class to the table, then add a style rule for all the
td elements within that table: <table cellpadding="0" cellspacing="0" [b]class="widget"[/b]>
<tr><td>your content</td></tr>
<tr><td>your content</td></tr>
<tr><td>your content</td></tr>
</table> And the CSS:
table.widget td {
border-top:1px solid #000;
border-bottom:1px solid #000;
}