Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Space between headerWrapper and logoWrapper

Space between headerWrapper and logoWrapper

Started by hell_guapo on 3 Oct 2011, 10:43 PM · Views: 3,113

Results 1 to 20 of 35
3 Oct 2011, 10:43 PM
#1
hell_guapo avatar

hell_guapo

Zen Follower

Join Date:
Jul 2011
Posts:
106
Plugin Contributions:
0

Post #1 by hell_guapo

1.3.9h

I am trying to eliminate unwanted spaces. See below.

http://i56.tinypic.com/10qb86x.jpg

I made the mainWrapper background color Gray temporarily.

I made each element a different background color so I could see what is going on. That is how i discovered the unwanted spaces.

Anybody know what controls this? I'd like to eliminate all the Gray spaces, except where the page content will appear.

:lamo:

3 Oct 2011, 11:44 PM
#2
rescoccc avatar

rescoccc

Totally Zenned

Join Date:
May 2010
Location:
WA State
Posts:
1,700
Plugin Contributions:
2

Post #2 by rescoccc

I think that if you go in to Admin/Configuration/Layout settings and set Define Breadcrumb Status to 0, the space next to "home" will go away. Of course, so will "home".

The best way to learn is to try stuff. But, back it up first.

3 Oct 2011, 11:54 PM
#3
hell_guapo avatar

hell_guapo

Zen Follower

Join Date:
Jul 2011
Posts:
106
Plugin Contributions:
0

Post #3 by hell_guapo

It's not my intention to get rid of the breadcrumb menu. :blink:

4 Oct 2011, 12:02 AM
#4
buildingblocks avatar

buildingblocks

Totally Zenned

Join Date:
Jun 2008
Posts:
629
Plugin Contributions:
0

Post #4 by buildingblocks

If I remember correctly the space above the left column is set by margin in the stylesheet. View source or inspect element to see which ID or class it is.

Depending on the template you are reworking the other spaces may be taken care of by removing <br class="clearBoth" /> from those specific areas.

/includes/templates/CUSTOM_TEMPLATE/common/tpl_header.php

Removing <br class="clearBoth" /> can sometimes have undesirable effects so keep checking on your changes and take note of where you made your change in case you need to restore.

4 Oct 2011, 12:17 AM
#5
gjh42 avatar

gjh42

Black Belt

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

Post #5 by gjh42

Sometimes changing <br class="clearBoth" /> to <div class="clearBoth"></div> will help with the spaces.

The stock /classic/ stylesheet rule that gives the sidebox spacing is.leftBoxContainer, .rightBoxContainer { margin: 0em; border: 1px solid #9a9a9a; border-bottom: 5px solid #336633; margin-top: 1.5em; }Eliminate the margin-top if you want all sideboxes to touch, or add a new rule for whatever sidebox is at the top of the column if you only want to close the top gap:```
#categories {margin-top: 0;}

4 Oct 2011, 12:31 AM
#6
hell_guapo avatar

hell_guapo

Zen Follower

Join Date:
Jul 2011
Posts:
106
Plugin Contributions:
0

Post #6 by hell_guapo

Ok I copied tpl_header.php to 'common' in my template folder. I found both instances of <br class="clearBoth" />

I commented out both, but the one between headerWrapper and logoWrapper messed up the layout:

Commenting out the second instance achieved the desired result and now there's no space between logoHeader and the Categories bar.

I corrected the first instance and I'm part way to my goal.

I'll check the margins in the CSS next. :bigups:

4 Oct 2011, 2:26 AM
#7
hell_guapo avatar

hell_guapo

Zen Follower

Join Date:
Jul 2011
Posts:
106
Plugin Contributions:
0

Post #7 by hell_guapo

Ok found the Margins in the CSS and corrected more of the problem.

There are still a few outstanding spaces left:

Anybody know where the code that controls these Gray areas is? :huh:

4 Oct 2011, 3:06 AM
#9
hell_guapo avatar

hell_guapo

Zen Follower

Join Date:
Jul 2011
Posts:
106
Plugin Contributions:
0

Post #9 by hell_guapo

Ok i found the navColumnOneWrapper and navTwoColumnWrapper margins and set them to 0em. :clap:

BUT, I still havent solved the problem in the title of this thread. :dontgetit

Can anyone help me get rid of this useless empty space?

:lamo:

4 Oct 2011, 3:24 AM
#10
buildingblocks avatar

buildingblocks

Totally Zenned

Join Date:
Jun 2008
Posts:
629
Plugin Contributions:
0

Post #10 by buildingblocks

that may be the #navMainWrapper top margin.

4 Oct 2011, 3:38 AM
#12
hell_guapo avatar

hell_guapo

Zen Follower

Join Date:
Jul 2011
Posts:
106
Plugin Contributions:
0

Post #12 by hell_guapo

buildingblocks:

that may be the #navMainWrapper top margin.

Nope :no:

4 Oct 2011, 3:57 AM
#13
buildingblocks avatar

buildingblocks

Totally Zenned

Join Date:
Jun 2008
Posts:
629
Plugin Contributions:
0

Post #13 by buildingblocks

Hell Guapo:

Nope :no:

well, sorry.....I said #navMainWrapper, top margin

and should have said #navMainWrapper top padding.

example: red denotes top padding

#navMainWrapper {padding:10px 5px 10px 5px;}

may not look exactly like mine

If that doesn't do it then.....a link...

4 Oct 2011, 5:25 AM
#14
hell_guapo avatar

hell_guapo

Zen Follower

Join Date:
Jul 2011
Posts:
106
Plugin Contributions:
0

Post #14 by hell_guapo

Well. I fixed the problem with a negative value margin for logoWrapper:

My CSS is as follows:

#headerWrapper, #contentMainWrapper, #logoWrapper, #cartBoxListWrapper, #ezPageBoxList, #cartBoxListWrapper ul, #ezPageBoxList ul, #mainWrapper, #popupAdditionalImage, #popupImage {
margin: 0em;
padding: 0em;
}

#logoWrapper{
background-image: url(../images/header_bg.jpg);
background-repeat: repeat-x;
background-color: #FF9900;
height:150px;
margin-top: -10px;
}

But it still doesnt explain where the extra 10px gap is coming from. :lamo:

I'd like to do it without having to use a negative value for margin... Any ideas? :dontgetit

losteras.com/store

4 Oct 2011, 8:20 AM
#15
dgent avatar

dgent

Totally Zenned

Join Date:
Nov 2009
Location:
UK
Posts:
1,117
Plugin Contributions:
0

Post #15 by dgent

Get rid of your -10px margin and add this line to your stylesheet.

#headerWrapper {background-color: #F90;}

The 'gap' is still there, but now its the same colour as your logo wrapper - so it doesnt matter.

4 Oct 2011, 11:32 AM
#16
buildingblocks avatar

buildingblocks

Totally Zenned

Join Date:
Jun 2008
Posts:
629
Plugin Contributions:
0

Post #16 by buildingblocks

try bottom padding for #navMainWrapper

4 Oct 2011, 3:11 PM
#17
hell_guapo avatar

hell_guapo

Zen Follower

Join Date:
Jul 2011
Posts:
106
Plugin Contributions:
0

Post #17 by hell_guapo

dgent:

Get rid of your -10px margin and add this line to your stylesheet.

#headerWrapper {background-color: #F90;}

The 'gap' is still there, but now its the same colour as your logo wrapper - so it doesnt matter.

I removed the -10px and tried what you said.

Advice appreciated but the 'hidden' gap will then cause a 10px unevenness above the logoWrapper. I would be forced to use a negative padding to correct the new issue. Plus, if I decide to change the color of logoWrapper, I'd be forced to change color in two places. :unsure:

4 Oct 2011, 3:16 PM
#18
gjh42 avatar

gjh42

Black Belt

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

Post #18 by gjh42

For information, you can't do negative padding, only negative margins.

I looked at your site and was not able to find a cause for the gap... really strange. The fixes that should have helped, didn't (except for the negative margin).

4 Oct 2011, 3:18 PM
#19
hell_guapo avatar

hell_guapo

Zen Follower

Join Date:
Jul 2011
Posts:
106
Plugin Contributions:
0

Post #19 by hell_guapo

buildingblocks:

try bottom padding for #navMainWrapper

Set padding-bottom to -0em and it caused the space under Home and Login to collapse within the DIV and had no effect on the Gray Mystery Space...

For the moment I commented out the -10px fix.

**Need a ZenCart Guru to solve this please. **:frusty:

4 Oct 2011, 3:27 PM
#20
hell_guapo avatar

hell_guapo

Zen Follower

Join Date:
Jul 2011
Posts:
106
Plugin Contributions:
0

Post #20 by hell_guapo

gjh42:

For information, you can't do negative padding, only negative margins.

I looked at your site and was not able to find a cause for the gap... really strange. The fixes that should have helped, didn't (except for the negative margin).

I've look at sites posted here that had only slight variation from the standard install of Zencart and this mystery gap happens on those sites as well. :frusty: