bho...@aol.com wrote:

> I'm waving the white flag here.  I'm trying to create an html table
> using css attributes, and regardless of what I'm trying, I can't get
> rid of the cellpadding.

Did you try setting the padding of cells to zero?

> Shouldn't this work?
> table{
> padding:0px;
> }

No, it should not affect cellpadding in any way. It sets the padding of the 
table element to zero, and it's normally zero anyway.

To set the padding of cells to zero, use

th, td { padding: 0; }

If you have a caption element in the table, you might want to add

caption { padding: 0; }

It's generally not a good idea to set cell padding to zero, though, at least 
if you have a genuine data table. More often, you would want to set 
_vertical_ padding to zero but horizontal padding so that cell contents does 
not hit the cell edge. Example:

th, td { padding: 0 0.2em; }

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/ 

______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
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/

Reply via email to