SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist
    Join Date
    Apr 2003
    Location
    lisboa
    Posts
    423
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    floating elements

    i read sitepoint Issue #61 where a floating element was built with css.
    I tried it out, works fine in i.e.6 but not in i.e. 5, where it is not floating
    How can i turn that around, so that it works too in i.e.5?
    the code:
    #menu {
    position: fixed;
    top: 0px;
    left: 0px;
    }
    i quote:
    Simply create a CSS file (e.g. ie6fixed.css) with the following code in it:
    html {
    overflow: hidden;
    }
    body {
    height: 100%;
    overflow: auto;
    }
    Then add it to your file after all your other style sheets (either linked or embedded) with this code:
    <!--[if IE 6]>
    <link rel="stylesheet" type="text/css" href="ie6fixed.css" />
    <![endif]-->

    thanks in advance

  2. #2
    SitePoint Wizard Ian Glass's Avatar
    Join Date
    Oct 2001
    Location
    Beyond yonder
    Posts
    2,384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by rfl
    #menu {
    position: fixed;
    top: 0px;
    left: 0px;
    }
    Neither IE5 or 6 supports "position: fixed"; try using "position: absolute" for positioning.

    Also, I don't know when thoes conditionals (the <!--[if...]--> parts) were introduced, but have you tried changing the "IE 6" to "IE 5"? No guaranties if it'll work though. ;-)

    ~~Ian

  3. #3
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    It's if[IE5+]

  4. #4
    SitePoint Evangelist
    Join Date
    Apr 2003
    Location
    lisboa
    Posts
    423
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for helping, but... doesnt work either


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
  •