div at top not expanding with content (part 2)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mike Koh
    New Member
    • Jan 2011
    • 2

    div at top not expanding with content (part 2)

    This question is a continuation of the question that was asked here (sorry, I couldn't find anything on the original post that would let me respond there):


    I did what Ben C suggested in post #3, which was to add the style body{float:left }. This solution worked for all the browsers I tested (Firefox, Chrome, Safari), except for IE (I'm using IE8). In IE, the body element is stationed at the width of the viewport instead of covering the whole width of the page, including scrollable content.

    Does anybody know a good hack that will fix this problem for IE?
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    Depends on your markup. In addition, IE is the worst browser on the planet and unpredictable. Without the complete markup or, preferably, a link, we can't tell.

    Comment

    • Mike Koh
      New Member
      • Jan 2011
      • 2

      #3
      Hi drhowarddrfine,


      Yes, I totally agree with your comment about IE. It's been the bane of my existence this week!

      I can't give you a link because the page I'm working on requires an account to our corporate website, but I noticed that the behavior I want to modify is something that's standard in IE. I found this out by going to the Yahoo website in IE8, opening Developer Tools, and highlighting the <body> element under the HTML tab. When the screen is resized to a width where scrolling is required and I refresh the page, the <body> element does not cover the entire content; it only covers the viewport. I hope you get what I mean...

      Do you know of a way to modify this behavior, so that <body> wraps everything when the viewport is narrower than the page content?

      Comment

      • drhowarddrfine
        Recognized Expert Expert
        • Sep 2006
        • 7434

        #4
        This would be easy to figure out if it didn't work in the modern browsers but, as it stands, I can't think of any IE quirk that would cause this. Perhaps you can show a simplified version of a page?

        Comment

        Working...