LaLaLa Posted July 18, 2009 Report 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 Report Share Posted July 18, 2009 (edited) 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;} Edited July 18, 2009 by dsonesuk Link to comment Share on other sites More sharing options...
Ingolme Posted July 18, 2009 Report 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 Report 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 Report Share Posted July 19, 2009 (edited) 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. Edited July 19, 2009 by dsonesuk Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now