SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Dec 2005
    Posts
    117
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    White background for body div in IE?

    Hey guys,

    I'm sure this is a simple question, but any advice would be greatly appreciated. If you goto:

    http://www.rdframe.com/dev/

    Don't worry, it's obviously a work in progress. In Firefox the entire body section of the page has a white background, but in IE it's transparent. When viewing in IE, there's no white background at all, and it just shows through to the page's background image.

    The body section is nested in a "bodyBox" div, and for Firefox is just "height: 100%" to fill the background with white. How do I accomplish the same in IE?

    Thanks!
    Kiopa Software -- Demo Now Online! Check it out!
    Goal: Consolidate all data & tools you use on a daily basis.
    Grand opening special, licenses FREE for a limited time.

  2. #2
    SitePoint Wizard bronze trophy Centauri's Avatar
    Join Date
    May 2007
    Location
    Newcastle, Australia
    Posts
    3,718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Height 100% of what ? - A percentage height referes to the height of a parent element that has a height set. As none of the parents (#wrapper, body, or html) have a height set, then there is nothing to calculate the 100% on. Actually, I'm surprised you are getting the results you are in Firefox.

    If you don't absolutely position the contents, instead letting them position naturally using margins and floats, then the #bodyBox div can be allowed to surround the content without having to set a height.

  3. #3
    SitePoint Guru Chroniclemaster1's Avatar
    Join Date
    Jun 2007
    Location
    San Diego, CA
    Posts
    784
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    height:100% is a highly unstable option as you're finding out. I agree with Centauri, don't use it if you don't have to.

    Place the content you want to be in the body inside the div, #bodyBox and set the background to #FFFFFF. You should need only minor tweaks from there.
    Whatever you can do or dream you can, begin it.
    Boldness has genius, power and magic in it. Begin it now.

    Chroniclemaster1, Founder of Earth Chronicle
    A Growing History of our Planet, by our Planet, for our Planet.


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
  •