SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2002
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question CSS and page cut off?

    If you are familiar with A List Apart (http://www.alistapart.com), I used to notice that when I clicked on an acticle to view it, it would cut off most of the article, showing only the top 20% of the page. When I hit the refresh button, the page would reload and the part of the page that was cut off would now appear, and the scroll bar would get longer.

    I am now using this CSS layout, which A List Apart uses called the "ALA Style Positioning" CSS (http://www.glish.com/css/9.asp), a top "Banner Row" and Two Columns:

    1. Left Column has CSS properties of "float: left;" and "width: 70%;".
    2. Right Column is fluid width.

    This only happends in IE 6.0, Windows. Mozilla, Netscape, and Opera never cut off a page, and then have it magically reapear after refreshing. This is quite annoying and I need to figure out why my pages are getting cut off.

    Thanks in advance for any insight,
    Cosmic

    P.S., the new look of SitePoint is amazing, well done!
    Last edited by CosmicCatalyst; Mar 1, 2003 at 16:03.

  2. #2
    Incoherent drivel since 1975 Zopester's Avatar
    Join Date
    Feb 2003
    Location
    UK
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's the fix:

    Code:
    if (document.all && window.attachEvent) window.attachEvent("onload", fixWinIE);
    function fixWinIE() { 
     if (document.body.scrollHeight < document.all.primarycontent.offsetheight) { 
      document.all.primarycontent.style.display = 'block';
     }
    }
    Explanation? ok...according to the Z-Meister:
    "In the script, primarycontent refers to the name of a structural area of this site’s new layout. If you use this script to make sure IE/Win displays your CSS layout properly, replace primarycontent with an id name value from your own site. For instance, if your menus live in a block level element called “nav” (<div id="nav"> ), use document.all.nav.offsetheight. As far as we know, your script need not reference the floated element per se. It can reference any element on the page, as its purpose is to re-flow the entire page and thus clear IE of cached values."

    Script by Aaron, at http://www.youngpup.net/
    Last edited by Zopester; Mar 1, 2003 at 16:32.
    Recommended Reading:
    Why we won't help you - An article by Mark Pilgrim.

    http://www.zopester.com - Coming Soon!

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2002
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alright, I found the daily entry at Zeldman that explains the "float flub". Do you have the exact link to YoungPup's script/explanation?

    Thanks a ton, this was bugging the crud out of me!
    Cosmic
    Last edited by CosmicCatalyst; Mar 1, 2003 at 18:39.

  4. #4
    Incoherent drivel since 1975 Zopester's Avatar
    Join Date
    Feb 2003
    Location
    UK
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Um...nope!
    Recommended Reading:
    Why we won't help you - An article by Mark Pilgrim.

    http://www.zopester.com - Coming Soon!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •