[thelist] CSS: rendering problem
Ken Kogler
ken.kogler at curf.edu
Mon Nov 18 14:17:09 CST 2002
> maybe it's my own fault, or maybe it's just ie.
Sounds like this one is IE.
> when i load the page in question, the main body <div> which
> encapsulates a few other <div>'s is rendered about 25% of
> the height it should be. If i switch to another window and
> cover up the page, it will be correctly drawn. as well as
> if i scroll down, i will see the bottom of the content box
> as if it had been drawn correctly.
This sounds like the same issue that AListApart ran into -- their
content block was getting chopped off in IE6 on the initial load.
Try adding this code to your <head>: (wrap alert!)
-------------------------------------------
if (document.all && window.attachEvent) {
window.attachEvent("onload", fixWinIE); }
function fixWinIE() {
if (document.body.scrollHeight <
document.all.content.offsetHeight) {
document.all.content.style.display = 'block'; }
}
-------------------------------------------
This was suggested by Aaron Boodman of youngpup.net, and can be found on
Zeldman's site here:
<http://www.zeldman.com/daily/0802d.html#csslayoutrevisited>
So sayeth the Zeldman:
"Aaron Boodman wrote a tiny JavaScript function
that, in the presence of IE/Windows, iterates
an existing property of the content block, causing
the page to reflow and display correctly. We've
added Aaron's script to ALA's primary, global
JavaScript file, and the site now seems to work
correctly in Microsoft's flagship Windows browser.
We also reported Eddie and Aaron's findings to
Microsoft to help that company fix its browser
bug in a future upgrade. "
Let us know if that works for you!
HTH!
--ken
More information about the thelist
mailing list