SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Nov 2006
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    no background color IE?

    This is supposes to give the div a green background color which is does in FF but don't in IE. In IE it stays white. Can someone explain why?

    HTML Code:
    <html>
    <head>
    <title>Untitled Document</title>
    </head>
    <body>
    <div style="position: relative; height: 200px;">
      <div >
        <div style="background-color:green; ">This is a test</div>
      </div>
    </div>
    </body>
    </html>
    And can someone explain why these to make a green background in IE?
    - changing relative to absulote
    - removing position style
    - removing height style
    - removing div surrounding div with background-color:green style
    - moving style=background-color: green to any divs above

  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)
    There is no "why" to IE .... Triggering HasLayout on the green div should show it - applying a height or width (maybe 100&#37 would do it, or IE's proprietary zoom property (although this is not valid css).

  3. #3
    SitePoint Zealot
    Join Date
    Nov 2006
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So this is some kind of bug in IE?

  4. #4
    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)
    IE has many bugs, both caused or cured by triggering its "HasLayout".


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
  •