SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2008
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Div height in IE8 compatibility mode

    I have given a div height of 150px. The height is not shown in IE8 compatibility view. Please find the URL of the page below. The css class name is MenuList.
    Test

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,389
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    In IE7 and below a stacking context created by a positioned element (position:relative in this case) is atomic and the children cannot overlap elements later in the html of the same (or higher) z-index. IE7 and below incorrectly assign a z-index of zero to positioned elements instead of the auto that the specs define.

    This means that your absolute child element is hidden by the elements that follow the div in question.

    You would need to raise the z-index of the parent to see the whole div.

    e.g.
    Code:
    .test{z-index:2}
    Code:
     <div class="Section test">
        <div class="MenuList" style="visibility:visible;" id="theLayer"><a href="#" style="float:right" onClick="hideMe();return false">X</a>Testing </div>
        <div class="Menu">-</div>
      </div>

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2008
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, it works now.


Tags for this Thread

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
  •