Hello Zen Family,
Is it possible to have a static header and a static left column on all pages that only allows the main body to move up or down?
If so, how?
If not, why not?
Thanks for your quick response!!
lj
Hello Zen Family,
Is it possible to have a static header and a static left column on all pages that only allows the main body to move up or down?
If so, how?
If not, why not?
Thanks for your quick response!!
lj
It's possible as long as you're not using IE6.
The CSS property
position: fixed;
can be applied to any element in your stylesheet, such as #headerWrapper and #navColumnOne, and will keep the element in the same place in the window while the rest scrolls. You also need to specify exactly where the element will be fixed with top: and left:
Unfortunately, IE6 doesn't know how to handle this and treats it like position: absolute; (keeping it in the same place on the page while the whole page scrolls).
You may be able to achieve your design purpose with the CSS property "overflow".
Set a fixed height for the center column, and give it
overflow: auto;
or
overflow: scroll;
and the box contents will have a scrollbar that allows all the content to be accessible. Auto only shows the scrollbar where needed while scroll always shows both scrollbars for predictability.
WOW, it worked perfectly
This is what I did:
Used the Firefox Element Information to find the class.
(you just taught me that a few days ago).
In this case it was named main_block.
Went to my css stylesheet and added this code:
.main_block {
height: 550px; overflow-y:scroll;
}
and the attached picture is the result. Exactly what I wanted.
Thanks so much. I thought it was going to be much harder with alot of coding to make this happen, yet it was so simple.....
Thanks again,
lj