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!
| SitePoint Sponsor |

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!

What do you mean? Do you mean like it is possible to do with CSS's position:fixed?




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.

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.

This is what fixed positioning is for.
Note that IE6 doesn't support it, so you need a fix: http://www.howtocreate.co.uk/fixedPosition.htmlCode:img { position:fixed; right:0; bottom:0; }


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:
Then apply the fix in that link for IE6, or don't bother with IE6 at all.Code:element.style.position = 'fixed'
Bookmarks