Jump to content

CSS Handling on Profile Page Changed Again?


CelebrationKim

Recommended Posts

I upload custom HTML stats on my geocaching.com profile page. Back in December a change was made that set border-spacing: 0px and border-collapse: collapse, I believe in the normalize.css file. There was a fix posted here and other places that said simply add the following after the <body> tag of your imported HTML:

 

<style type="text/css">

table { border-collapse: separate; border-spacing: 1px; }

</style>

 

And this indeed totally fixed the problem. But yesterday I updated my stats, probably the first time since the last release, and the same problem is back, no margins in my tables. It seems this style information is being ignored again :-(. If I manually change the values in normalize.css inside the Chrome Developer tools from collapse to separate and from border-spacing 0px to 1px, it fixes the problem. So why is the profile page ignoring this style information now? Is there something I can do on my side to get my stats page looking right again?

Link to comment

hmm... it looks like there's a script that runs which explicitly re-sets all table elements' border-spacing property to the table's "cellSpacing" attribute. I believe the capital "S" may be messing things up with the "attr" jquery function, as the attribute is all lowercase; and it's the 'css' function which treats "cellSpacing" and "cell-spacing" the same. So their code may be forcefully resetting all table elements post-load to just "px" (or, no spacing)

 

Try playing around with the cellspacing HTML attribute of your table and see if that fixes it.

 

It's annoying they run a script to forcefully alter the CSS post-load, especiallyif it's buggy; but jQuery is great for browser compatibility and that may solve some of the CSS compatibility headaches. ... you know, if the script actually works :P

 

(of course if your tables already have cellspacing="1" then that may be the evidence that their code is buggy; and forcing the CSS property won't help since it's altered after the CSS is loaded)

Edited by thebruce0
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...