Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Static Header & Left Column Is this possible?

Static Header & Left Column Is this possible?

Locked

Views: 1,834

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
28 Jan 2008, 9:13 PM
#1
ljdream00 avatar

ljdream00

Zen Follower

Join Date:
Jun 2007
Location:
Michigan
Posts:
168
Plugin Contributions:
0

Static Header & Left Column Is this possible?

:mellow: 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

28 Jan 2008, 9:39 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Static Header & Left Column Is this possible?

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).

28 Jan 2008, 9:46 PM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Static Header & Left Column Is this possible?

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.

29 Jan 2008, 2:38 PM
#4
ljdream00 avatar

ljdream00

Zen Follower

Join Date:
Jun 2007
Location:
Michigan
Posts:
168
Plugin Contributions:
0

Re: Static Header & Left Column Is this possible?

:clap:WOW, it worked perfectly :clap:

This is what I did:
Used the Firefox Element Information to find the class.
(you just taught me that a few days ago:blush:).

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.....:D

Thanks again,
lj

gjh42:

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.