SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot
    Join Date
    Jan 2005
    Location
    md
    Posts
    180
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    bottom right image w/ scrolling

    Does anyone know of a script that will allow me to display an image at the bottom right of the browser and will scroll as the page scrolls?

    Thanks!

  2. #2
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    What do you mean? Do you mean like it is possible to do with CSS's position:fixed?

  3. #3
    SitePoint Guru
    Join Date
    Apr 2007
    Posts
    813
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it is like sitepoint advertisement that occasionally appears at the bottom of this page. you can use a div, positioned it top the bottom of page as mentioned, use position:fixed.

  4. #4
    SitePoint Zealot
    Join Date
    Jan 2005
    Location
    md
    Posts
    180
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry if I wasnt clear... but basically I want to position an image at the bottom right hand corner of a browser... and if the page scrolls, have it stay there.. I want to do this with javascript however, and not CSS..

    Lots of sites used to do this.. i know geocities used to have their logo at the bottom right... im sure others as well... just can't seem to figure out a good way to do it.

  5. #5
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    This is what fixed positioning is for.
    Code:
    img {
      position:fixed;
      right:0;
      bottom:0;
    }
    Note that IE6 doesn't support it, so you need a fix: http://www.howtocreate.co.uk/fixedPosition.html

  6. #6
    SitePoint Zealot
    Join Date
    Jan 2005
    Location
    md
    Posts
    180
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Raffles View Post
    This is what fixed positioning is for.
    Code:
    img {
      position:fixed;
      right:0;
      bottom:0;
    }
    Note that IE6 doesn't support it, so you need a fix: http://www.howtocreate.co.uk/fixedPosition.html
    But what about doing this in JavaScript and not css? I could just do document.write for that, but i know there is a more elegent way.

  7. #7
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I don't understand why you don't want to do it with CSS. It's the most elegant way. But you can apply position:fixed via javascript anyway, using the style object:
    Code:
    element.style.position = 'fixed'
    Then apply the fix in that link for IE6, or don't bother with IE6 at all.


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
  •