# Image Stays Stationary While Scrolling -- How Do I Do It?



## ShadowProwler420 (Jun 21, 2007)

Anyone know how to make an image stay fixed in one spot while scrolling on the web page?

The way I am envisioning the idea I am toying with for a website I am building is having an image in one of the corners that will stay in that location while the rest of the page scrolls (sort of like how myspace profiles work). The image will serve as a visual cue to the user that they are viewing the correct page.

I thought about using frames, but eventually ruled that out as an option (mainly because they would create 'dead space'; that and they may cause the need for side-scrolling in the main part of the pages to read any text (unless, of course, I compensate for that and change the layout of the text)).

Thanks


----------



## ShadowProwler420 (Jun 21, 2007)

Anyone?


----------



## colinsp (Sep 5, 2007)

This one may do what you want http://www.dynamicdrive.com/dynamicindex4/flyimage2.htm. Bear in mind that it won't work if your visitors have javascript disabled.


----------



## Ellemire (May 12, 2009)

You can get an image to stay in a fixed position by adding a css property (position:fixed) but this is not supported in IE. However, there are a few workarounds available to get around IE's lack of support you can view them at http://devnull.tagsoup.com/fixed/.

Example:
(HTML Code)

```
<p class="navigation-bar">
<a href="index.html">introduction</a> | 
<a href="side_panels.html">side panels</a> | 
<a href="links.html">links</a> | 
<a href="appearance.html">text</a> | 
<a href="navigation_bars.html">navigation</a> | 
<a href="text_and_images.html">images</a> | 
<a href="bullets.html">bullets</a></p>
```
(CSS Code)

```
p.navigation-bar {background: url(backgroundpng);
position: fixed}
```


----------

