Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Unable to center header?

Unable to center header?

Locked

Views: 1,573

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
4 Dec 2008, 7:36 PM
#1
aesthetics avatar

aesthetics

New Zenner

Join Date:
Nov 2007
Posts:
54
Plugin Contributions:
0

Unable to center header?

So, here's our site: aestheticsbodymod.com/store

...it's been a while since I did everything on the site and I can't for the life of me remember how to make the header image centered.

Ideally, I'd like the header image (#logowrapper in the css, right?) to span all the way across the screen to mimic the main part of our site (aestheticsbodymod.com). A second-best option would be to have it at least be centered instead of having more dead space to the right of the banner than to the left.

Input please? I have a feeling this is a really simple issue, I just can't remember where the settings for it are...

Thanks!

4 Dec 2008, 7:51 PM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: Unable to center header?

Let me guess... your monitor is at least 1280px wide.
On a common 1024px monitor, your logo doesn't fit and forces horizontal scrolling - bad even if the site as a whole does fit the screen. You do want a flexible width logo. You can use #logoWrapper and #logo in your stylesheet to make a flexible image. Google "sliding door method" for the standard tutorial on this.

4 Dec 2008, 9:03 PM
#3
aesthetics avatar

aesthetics

New Zenner

Join Date:
Nov 2007
Posts:
54
Plugin Contributions:
0

Re: Unable to center header?

Yep, you called it on monitor size... I hadn't even noticed the scrolling!

The sliding door method looks good, and I bookmarked that for further use, but until I have time to dedicate to figuring that out, is there a way to just center the image? If I make it smaller than 1024 will it center itself? (I tried setting it at 900px and it still seemed left-aligned...)

4 Dec 2008, 9:17 PM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: Unable to center header?

Try finding #logoWrapper in your stylesheet and removing any float property, and give it margin: auto;

4 Dec 2008, 9:23 PM
#5
aesthetics avatar

aesthetics

New Zenner

Join Date:
Nov 2007
Posts:
54
Plugin Contributions:
0

Re: Unable to center header?

Excellent -- thanks for the help!

5 Dec 2008, 3:23 AM
#6
looper avatar

looper

New Zenner

Join Date:
Aug 2006
Posts:
52
Plugin Contributions:
0

Re: Unable to center header?

I am having the same type problem. Can somebody look at the wrapper and suggest what to do
Thanks!!!

5 Dec 2008, 10:52 AM
#7
gjh42 avatar

gjh42

Black Belt

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

Re: Unable to center header?

We need to see your site live to advise accurately on what you need to do. If we can see your site, we can read your stylesheet and test fixes.

You might want to find the
#logoWrapper {
rule and add margin: auto; to it:

#logoWrapper {
    margin: auto;
    ...whatever existing...
    }
5 Dec 2008, 9:22 PM
#8
looper avatar

looper

New Zenner

Join Date:
Aug 2006
Posts:
52
Plugin Contributions:
0

Re: Unable to center header?

Thanks Glen, will do