LaLaLa Posted July 18, 2009 Share Posted July 18, 2009 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 More sharing options...
dsonesuk Posted July 18, 2009 Share Posted July 18, 2009 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 More sharing options...
Ingolme Posted July 18, 2009 Share Posted July 18, 2009 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 More sharing options...
LaLaLa Posted July 19, 2009 Author Share Posted July 19, 2009 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 More sharing options...
dsonesuk Posted July 19, 2009 Share Posted July 19, 2009 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.