SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru
    Join Date
    Nov 2008
    Posts
    625
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Position:Fixed not working in IE6 with z-index

    Hi all

    "Position:Fixed" is not working in IE6 with z-index

    the orange button on the left should be above the grey page image.

    see this below link
    http://wdpixels.com/ie6prob/promo.html

    vineet

  2. #2
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,750
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Position:fixed isn't supported in IE6. It automatically reverts back to position:static.

    You could use a script for IE6 (JS) which makes it position;absolute; and then uses JS to give the appearence of position:fixed. Although IE6s' user base is really so small now that it's dead. I wouldn't bother fixing this unless you know IE6 users are a sizable chunk for your website.
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

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

    IE6 doesn't support position:fixed at all.

    The best you can do without script (or very complicated hacks) is to let iE6 have position:absolute instead and let it scroll with document.

    Just place it before the fixed rule and ie6 will use what it knows:
    Code:
    .el{
    position:absolute;/* ie6*/
    position:fixed;/* everyone else*/
    }

    You should also use top:200px rather than margin-top:220px as margin will rely on the elements position in the flow before it is offset whereas as top will place it there no matter where it was.

  4. #4
    SitePoint Guru
    Join Date
    Nov 2008
    Posts
    625
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    thanks Ryan and Paul

    i will try your suggestions

    vineet


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
  •