Jump to content

Css Equivalents Of <table> Cellpadding/cellspacing?


LaLaLa
 Share

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;}

Edited by dsonesuk
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.

Edited by dsonesuk
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...