Click to See Complete Forum and Search --> : Fixing a Container for Scroll?


Nerdygeek
07-28-2009, 08:42 AM
When fixing a conatiner that contains data, what is the code I use to make sure it is fixed along the left or right hand side of the whole page even when the user scrolls?

My guess is this

.container {
width: 100px;
height: 100px;
top: 50%;
left 10px;
position: fixed;
}

But this doesn't seem to work..

Thanks.

bluejie
07-30-2009, 02:48 PM
Hi,

You have missed a : after left. Here is the right code, could try whether that works?

.container {
width: 100px;
height: 100px;
top: 50%;
left: 10px;
position: fixed;
}