Hello, I'm working on a site for a company, but now I've run into a problem. I want to know how i can lock the sidebar, so that when I scroll down in the content area, the sidebar will stay at the same place.
The site is located at: http://miracle.x10hosting.com/
So the picture of the necklace in the sidebar has to stay in place, even when I scroll down in the content area.
Second but less important question: I also want to know if the page wrapper can also be centered vertically?
[solved] Locking the sidebar?
[solved] Locking the sidebar?
Last edited by Evert on Sun Sep 23, 2007 3:38 pm, edited 1 time in total.
Re: Locking the sidebar?
Now you have height for #content. You also have overflow Auto for it. This means that #content will have scroll bar if text- images inside it does not fit in. Since in contains both #sidebar and #main - scrolling will move both.
What I would do is to have #content height:auto (remove overflow:auto) and #main height:363px;overflow:auto. This way Image stays but #main will have scroll bar.
If you have page height allways same then you could have #pagewrapper position:absolute;
top:50%;
margin-top:-260px; <- half of pagewrapper height.
br, K
What I would do is to have #content height:auto (remove overflow:auto) and #main height:363px;overflow:auto. This way Image stays but #main will have scroll bar.
If you have page height allways same then you could have #pagewrapper position:absolute;
top:50%;
margin-top:-260px; <- half of pagewrapper height.
br, K
Re: Locking the sidebar?
Thanks, that seems to work 

Re: Locking the sidebar?
Nice:)
Remember to mark you first message subject [Solved]
Br, K
Remember to mark you first message subject [Solved]
Br, K
Re: Locking the sidebar?
I still have a problem with the vertically centering. It looks the way I want in Firefox, but is is screwd up in IE. What could the problem of this be?
Re: Locking the sidebar?
Your javascript image changing thingy is inside . That might be causing your problems.
br, K
br, K
Re: Locking the sidebar?
I don't think that's the problem, the pages where I don't have the pictureslide are also screwd up in IE.
edit: Fixed it
edit: Fixed it

Last edited by Evert on Sun Sep 23, 2007 3:38 pm, edited 1 time in total.
Re: [solved] Locking the sidebar?
How did you fix it?...