Previous Message
Next Message

CSS reset and table cell padding

Sent by Andrew Gaffney on 30 October 2008 18:06


David Hucklesby wrote:
> On Wed, 29 Oct 2008 13:36:40 -0500, Andrew Gaffney wrote:
>> I've found recently that when I use a CSS reset, I can no longer use the "cellpadding"
>> attribute on a TABLE tag, but the "cellspacing" attribute works just fine. Is this
>> normal? Is there a recommended way to deal with this?
>>
> [...]
> 
> To expand on Georg's reply re: fine-tuning those reset styles to your
> own requirements, I'd like to suggest that Eric Meyer never intended
> his reset styles to be used thoughtlessly and "as is." In his related
> article[1] he states:
> 
>   "My hope is that people will use them as a launch pad for their own
>    resets and for deeper thinking about styling and browsers."
> 
> [1] <http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/>

They weren't being used by themselves. I did the reset and then proceeded to set 
by own margin/padding for various elements in the stylesheet. However, even so, 
I'd want to the default padding on any given TD to be 0.

I tried to do a CSS solution to this problem by creating a style like:

table.cellpadding_4 tr td {
   padding: 4px;
}

and then putting class="cellpadding_4" on the TABLE containing the TDs I wanted 
to have the padding, but this didn't seem to have any effect. What's the proper 
way to do this?

-- 
Andrew Gaffney
agaffney.org
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: