Grow your CSS skills. Land your dream job.

Internet Explorer: body not stretching too 100% width

  • bas
    # November 13, 2009 at 9:07 am

    Fellow webdevelopers,

    I really hope to solve a problem that I’m currently facing with all versions of IE.
    I’m building my own website, and for some reason, my body is not 100% width. If I specify a red border around my html, I clearly see that the html is 100%width and 100%height. But for some reason, if I specify the same border around my body tag, I see it’s only 960px width, which is utterly weird because I’m not at all restricting the body’s width in the CSS file in any way.

    In firefox, my body is indeed 100% width and height, and has the same dimensions as the html tag. It behaves nicely. So this problem is only occuring in internet explorer, in all versions. I’ve got to mention that I’ve got a page-wrapper inside my body that has a width of 960px.. but I don’t see why my body is, therefore, also a 960px width. Very weird indeed.

    I really do need the body to be a 100% width, so I can let my background-images extend the 960px width of the page-wrapper for screen resolutions beyond 1024×768. Right now it just looks ugly in IE. Any help is appreciated, because I’m stumbled and can’t find out where the bug is hiding.

    URL: http://wp.citroenboom.com – I’ve given the body a border of 2px solid red for clarity, so you can clearly see what I’m talking about in terms of the differences between FF and IE.

    # November 13, 2009 at 10:30 am

    Like the sticky says:

    Quote:
    Validation: It’s your cross browser compatability friend!

    Lo and behold, 4 errors http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwp.citroenboom.com%2F

    Close the opening body tag:

    Code:
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".