Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 12
    Just a general suggestion, check to see if your style.css does a "reset" on your tables before trying these solutions. Example: If you don't have tables set to width:auto then border-collapse might not work as expected. Commented Sep 1, 2016 at 7:12
  • 3
    Use border-spacing on table and padding on td. Commented May 23, 2017 at 9:17
  • 8
    "Oh, dang, back in the olden days I did this with cellpadding and cellspacing... what is that in CSS again?" –me, pretty much every time I need to do this. Commented Aug 13, 2021 at 16:43