Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Gap between header and main content...Help!

Gap between header and main content...Help!

Locked

Views: 6,437

Results 21 to 24 of 24
This thread is locked. New replies are disabled.
4 Jan 2009, 2:19 AM
#21
socalcane avatar

socalcane

New Zenner

Join Date:
Jan 2009
Posts:
13
Plugin Contributions:
0

Gap between header and main content...Help!

I am having a similar problem, and after about 4-5 hours trying to fix this myself (stubborn pride), I concede that I just can't figure it out! I tried the solution described above, and I've had only minimal luck. I followed jettrue's advice:

In your tpl_header.php, change all:
<br class="clearBoth">

to <div class="clearBoth"></div>

Then in your css, change:

.clearBoth {clear:both;}

to

.clearBoth {
clear:both;
height:0;
font-size:0;
line-height:0;
margin:0;
padding:0;
}

That suggestion helped a little. Previously I had a gap over and under my main navigation tabs. After making that change, most of the gap underneath went away. However, there's still a strange 1px white line showing (in Firefox and Chrome, but not IE7.) I can't figure out what's happening.

Even worse, the white gap on top is still there! So I would really appreciate it if someone would take a look at my code and tell me at least how I can get rid of that pesky gap between my header (#headerWrapper) and main navigation (#mainNAVlinks). I've already pulled out my remaining hair trying to figure it out today!

Please disregard the domain name, as it's completely unrelated to this shopping cart I'm trying to build for another site. (I don't have access to my new client's server at the present time, so I picked an old domain that I had access to.) The url is (warning:mature theme) : http://www.sexualenhancement.net/store/

4 Jan 2009, 7:45 AM
#22
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: Gap between header and main content...Help!

Not really the best way to fix it but, a quick fix is to go around line 210 in your stylesheet and add margin-top: -10px; to the call.

4 Jan 2009, 6:13 PM
#23
socalcane avatar

socalcane

New Zenner

Join Date:
Jan 2009
Posts:
13
Plugin Contributions:
0

Re: Gap between header and main content...Help!

Thanks for the tip, dbltoe! After some tweaking, it seems like that fixed my problem!

You know, I tried to do the same thing yesterday before I posted. It worked for Chrome and Firefox. However, the main logo got cut off in IE. Today, after trying the solution (margin: -10px) again, I realized that all I needed to do was fix the positioning on my logo - and now all's good in IE too.

Thanks again for your help!

4 Jan 2009, 6:35 PM
#24
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,763
Plugin Contributions:
9

Re: Gap between header and main content...Help!

glad you got it goin' and thanks for letting others know the solution.:clap: