SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Sep 2005
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question force div into corner of window?

    Hello,

    How does one make a div element remain in the corner of the window at all times? here's an example of what I'm trying to achieve: http://www.quirksmode.org/dom/toc.html

    you can see the 'contents' element remains stationary on screen as you scroll the page...

    unfortunately I don't understand the code in the example above.

    TIA

  2. #2
    SitePoint Addict
    Join Date
    Mar 2005
    Location
    Toronto
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The trick here is "position: fixed". Just apply that to any element you want fixed on the screen. And that's all! Unfortunately that does not work on IE, though there are some IE hacks
    http://tagsoup.com/-dev/null-/css/fixed/
    In search of the clouds...and maybe some work

  3. #3
    SitePoint Zealot
    Join Date
    Sep 2005
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you, this is what I was looking for.


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
  •