views:

217

answers:

2

So I have a global reset rule:

* {
margin:0px;
padding:0px;
}

I also have a LOT of tables with pre-defined cellpadding values. However, the global reset rule is killing all the cellpadding values. What would be the best way to get the cellpadding back without having to create a specific css rule for each table? (There are a lot of tables.)

Thanks in advance.

EDIT: to clarify, if I took out the padding:0px; rule then all the tables would look perfect. But, I still need the global reset for other stuff.

+2  A: 

Your best bet is to use a reset sheet like Eric Meyer's, and cut-out tables from there.

What is odd is that inline formatting should be trumping global formatting.

Tordek
Yeah that's what I was thinking... I guess the global css trumps the old-school table HTML styles - technically not inline css, right? So I guess this would be about the only way to do it... change the reset rules so that tables are excluded?
Eric Yang
A: 
table
{
  padding: 3px;
}

and/or possibly

table tr
{
  padding: 3px;
}

and/or possibly td, th and all other table related elements.

DanDan
Thanks for your answer. This would work great except each table uses a different cellpadding.
Eric Yang