[thelist] How to make a page re-apply its stylesheets without reloading?

Barney Carroll barney at textmatters.com
Mon May 21 04:12:50 CDT 2007

Hi list,

Recently I hit upon a Firefox bug that isn't really a bug because it's a 
hack failure. It's a conditional breakdown of the faux-columns CSS 

Normally the trick relies on the column being a div with very large 
bottom padding, and equally large negative bottom margin, and its parent 
having overflow set to hidden. In my case, due to a slightly more 
complicated design, I have the /great-grandparent/ set to overflow:hidden.

This works fine except under certain circumstances with Firefox (1.5 
through to 3.0 alpha 5): When the page is accessed from the cache, the 
columns just extend to their full stated padding, as if the overflow 
weren't taking effect.

I know that on page reload this problem dissapears, but a reload every 
time the user visits this page is a bit too irresponsible. I'd rather 
have some kind of script that /re-applies/ the stylesheets on page 
ready, because ultimately all the necessary info is already client-side 
and contacting the server is superfluous.

Any ideas how I could go about doing this?


More information about the thelist mailing list