Jump to content

Css Equivalents Of <table> Cellpadding/cellspacing?


LaLaLa

Recommended Posts

What are the CSS equivalents of the cellpadding and cellspacing attributes of a <table> element? I have tried setting the table's margin and padding to 0px but this has no effect.

Link to comment
Share on other sites

border-spacing: is one, and i'm sure padding is used, are you assigning these to td, and not just to table?table td { border-spacing: 0; padding: 0;}ortable.tableclass td { border-spacing: 0; padding: 0;}ortable#tableid td{ border-spacing: 0; padding: 0;}

Link to comment
Share on other sites

There are no real CSS equivalents. But cellspacing and cellpadding are not deprecated, so if you're planing on using tables, it's just fine to use those attributes.

Link to comment
Share on other sites

There are no real CSS equivalents. But cellspacing and cellpadding are not deprecated, so if you're planing on using tables, it's just fine to use those attributes.
Ok, that's easier to do. Thanks.
Link to comment
Share on other sites

yes, using cellspacing and cellpadding will be the way to go, as crappy IE don't support border-spacing.for a table with no cellpadding or cellspacing, using border-spacing: 0; and padding:0; border-collapse: collapse; will achieve the same result.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...