Click to See Complete Forum and Search --> : [RESOLVED] Non-Scrolling div


The Little Guy
08-05-2006, 02:37 PM
I have a div, and is it possible to make it so when there is a scroll bar, and you scroll up and down, the div doesn't move?

The idea is to give an effect of a frame.

pacerier
08-05-2006, 02:44 PM
you can try this:
<div style="overflow:auto; width:100px; height:100px;">

modify the width and height to your liking.

The Little Guy
08-05-2006, 02:52 PM
No.. Not exactly what Im looking for.

I want the content to fill the page, and scroll, and the navigation not to scroll.

In IE, since there is alreay a scroll bar on the right, it would place one next to that scoll bar, which would look dumb.

The Little Guy
08-05-2006, 02:53 PM
Here is an example of what I want

http://www.w3.org/Style/CSS/

NogDog
08-05-2006, 03:06 PM
position: fixed; (http://www.w3.org/TR/CSS21/visuren.html#propdef-position)

pacerier
08-05-2006, 03:09 PM
try
<div style="position:fixed; top:0px; right:0px;">

you can change top right to either left or bottom as you will like it to be. the value will be the offset. btw take note that this does not work in IE

The Little Guy
08-05-2006, 03:41 PM
Thanks, it works!