Jump to content

Cellspacing Broken


Recommended Posts

The cellspacing option for tables is broken. It simply doesn't do anything, and I cannot for the life of me make it work even with CSS (border-spacing).

Example Table
Blah blah blah Blabbity blah blah
Example Table
Blah blah blah Blabbity blah blah

In these two examples, the first one has a cellspacing of 5 while the second a cellspacing of 0. They shouldn't look identical, with only the second one looking the way it should with that setting.

Edited by Quentin Harlech (see edit history)
Link to comment
Share on other sites

I suspect that because the cellspacing and cellpadding attributes within HTML tables have been deprecated for some time, it may be the case that support for them has now been dropped by all the major browsers. [In fact, I'm pretty certain that they're not part of the HTML 5 specification].

Instead, you'll need to use CSS styling to achieve similar effects on the table cells.

Link to comment
Share on other sites

As mentioned in my previous post, it's not working even with the CSS border-spacing property. And no, it's not a browser issue as both cellspacing and border-spacing work fine on every modern browser and every other website on the Internet.

This is a Myth-Weavers issue. For some reason they are overriding and forcing border-spacing to 0 here despite offering it as an option in their own interface.

Link to comment
Share on other sites

Well, the CSS border-collapse attribute is set to 'collapse' on the table which overrides the border-spacing attribute (border-spacing also defaults to zero) if those two attributes are switched off in the developer tools then the cells do work out.

However, best practice is to have border-collapse set to collapse, so I can't imagine that being switched off in the defaults, but you could override that in your local table styling and set it to:

border-collapse: separate;

You'd should also set the border-spacing attribute to whatever you wish your spacing to be.

Just tried this on your first table above using the devtools in my browser and that appears to work fine.

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
×
×
  • Create New...