SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2002
    Posts
    95
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Position: fixed doesn't work?

    In my HTML document I have

    Code:
    <div id=test>
    alsakd jalskdj ljasdl jas <br>
    aslkdjlasjd
    </div>
    and in my .css document I have

    #test {background-color: black; width:100; position:fixed; left:100; top:100}

    but still this div element does not stay in the window when i scroll. Why is that?

  2. #2
    Grumpy Mole Man Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Internet Explorer doesn't support "position: fixed". Mozilla, Netscape 6+ and Opera support it fine but IE is lagging behind. Maybe we'll be able to use it once they release IE7...

  3. #3
    SitePoint Evangelist
    Join Date
    Oct 2001
    Posts
    439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    isnt it supported in IE6........??

    it works fine for IE5 on a mac.......

  4. #4
    SitePoint Addict psychedelic's Avatar
    Join Date
    Feb 2002
    Location
    Boston
    Posts
    284
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    do this, works like a charm for me.
    Code:
    body {
    	background-image: url("images/background.jpg"); 
    	background-repeat: no-repeat; 
    	background-attachment: fixed
    }
    The Internet is prettier on a Mac.

  5. #5
    SitePoint Evangelist
    Join Date
    Oct 2001
    Posts
    439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    that wil work for a similar visual effect.......but will not allow the functionality that is available with fixed positioning............

  6. #6
    Grumpy Mole Man Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IE5 on the mac is actually quite a different browser from IE 5/6 on the PC - it tends to be a lot more standards compliant.

    Last night I found a method of getting position:fixed to work in IE5/6 on the PC - have a look at this:

    http://and.doxdesk.com/software/js/fixed.html

  7. #7
    SitePoint Evangelist
    Join Date
    Oct 2001
    Posts
    439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for that skunk........although it was a little shaky.....

    I dont know why IE hasnt built proper support for fixed positioning........it is such a great feature.......and why have IE built more standards compliance into the MAC version than the pc version??


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
  •