SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    May 2006
    Posts
    250
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Absolute positioned not displaying at all on one page in IE6

    Hi all can anyone see why my absolutely positioned <ul> isn't displaying on this page in IE6 its ok on all other pages.

    Also I seem to be running into this problem with IE6 and absolutely positioned elements on every site I use it on. I try not to use absolute positioned but sometimes its ideal. Does anyone have any links to the reason why IE6 behaves this way.

    Many thanks

    Mike

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

    There are usually 2 main reason why an absolute element won't show in IE.

    The first is if the html for the absolute element is in the middle of html that is statically placed as IE doesn't like this. It likes the html for the absolute element to be placed at the end of the current stacking context and then it will magically display ok.

    The second issue occurs when an absolute element follows floated elements and this can cause the absolute element to disappear. The solution in this case is simply to add clear:both to the absolute element (utter nonsense that it is).

    In your page it seems its the second issue that is causing the problem and just adding this css should cure it.

    Code:
    .quicksearch {
        width: 130px;
        position: absolute;
        top: 0;
        left: 0;
        margin: 30px 0;
        z-index: 100;
        clear:both;
    }

  3. #3
    SitePoint Addict
    Join Date
    May 2006
    Posts
    250
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats done it! Thanks for explaining it so well too.

    Thanks


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
  •