Microsoft
Software
Hardware
Network
Question : What CSS Do I Need To Keep a Table TD Selector From Overriding TDs in Nested Tables?
In my page I have a table nested in another table. Something like this:
<table class="my-table">
<tr>
<td>Data 1</td>
<td>Data 2</td>
<td>
<table class="my-panel">
<tr>
<td class="top-left"> </t
d>
<td class="top-mid"> </td
>
<td class="top-right"> </
td>
</tr>
... etc.
</table>
</td>
</tr>
</table>
In my CSS I have a selectors like this:
.my-table td
{
padding: 0 5px 4px 0;
}
td.top-left
{
...
}
td.top-mid
{
...
}
etc.
What happens is that the padding from the .my-table td selector is being applied to the TDs in the my-panel table.
How can I adjust my selectors to prevent the padding from cascading down into the nested tables?
Thanks Experts!
Answer : What CSS Do I Need To Keep a Table TD Selector From Overriding TDs in Nested Tables?
You can't really prevent styles from cascading (that's why they're called Cascading Style sheets)
You could add another class for my-panel that overrides the class for my-table
.my-panel
{
padding:
0px;
}
Random Solutions
MS Office Windows File Associations via command line
How to get download csv file using java servlet ?
vba coding help with microsoft access table audit trail of checkboxes and command buttons
How to make live sync for folders?
I need detailed instructions on how to import 1400 students into novell 6.5. I cant find my old directions.
string cuts of on varchar
XP Remote Desktop Connection
How can I alter the width of a datasheet inside a subform?
how move a hit area for a movie in AS3
How can I fill a list box which shows if no contact have been made in the last 90 days and no file has been added to a specific folder in the last 90 days in MS Access forms with VBA?