Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / TPL_HEADER problem v138a

TPL_HEADER problem v138a

Locked

Views: 1,553

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
13 Apr 2010, 5:43 PM
#1
cs_jono avatar

cs_jono

Inactive

Join Date:
Oct 2007
Posts:
187
Plugin Contributions:
0

TPL_HEADER problem v138a

Hey guys,

I'm having a problem within my tpl_header over cross operating systems. :frusty: In Windows the Categories (in all browers, ie. Internet Explorer, Firefox, Chrome) that we have in our header looks like this:

However in mac operating system it looks like this

This wouldn't be a problem if over 10% of our customers didn't use a mac but unfortunately they do.

The code that is controlling this is:

TPL_Header

<div id="headerCat">
<div style="float:left;">
<?php echo zen_image(DIR_WS_TEMPLATE_IMAGES . 'catSpacerL.gif', 'spacer'); ?>
</div>
<div id="headerCatInfo"><span style="margin-left: 13px;"><a href="<?php echo zen_href_link('index&cPath=343') ?>">Collectibles</a></span><?php echo zen_image(DIR_WS_TEMPLATE_IMAGES . 'catLine.gif', 'spacer'); ?><a href="<?php echo zen_href_link('index&cPath=329') ?>">Clothing</a><?php echo zen_image(DIR_WS_TEMPLATE_IMAGES . 'catLine.gif', 'spacer'); ?><a href="<?php echo zen_href_link('index&cPath=12') ?>">DVDs</a><?php echo zen_image(DIR_WS_TEMPLATE_IMAGES . 'catLine.gif', 'spacer'); ?><a href="<?php echo zen_href_link('index&cPath=11') ?>">Games</a><?php echo zen_image(DIR_WS_TEMPLATE_IMAGES . 'catLine.gif', 'spacer'); ?><a href="<?php echo zen_href_link('index&cPath=5') ?>">Gifts</a><?php echo zen_image(DIR_WS_TEMPLATE_IMAGES . 'catLine.gif', 'spacer'); ?><a href="<?php echo zen_href_link('index&cPath=261') ?>">Jewelry</a><?php echo zen_image(DIR_WS_TEMPLATE_IMAGES . 'catLine.gif', 'spacer'); ?><a href="<?php echo zen_href_link('index&cPath=9') ?>">Music</a><?php echo zen_image(DIR_WS_TEMPLATE_IMAGES . 'catLine.gif', 'spacer'); ?><a href="<?php echo zen_href_link('index&cPath=2304') ?>">Sports</a><?php echo zen_image(DIR_WS_TEMPLATE_IMAGES . 'catLine.gif', 'spacer'); ?><span id="catSpacer" style="margin-right: 13px;"><a href="<?php echo zen_href_link('index&cPath=388') ?>">Toys</a></span>
</div>
<?php echo zen_image(DIR_WS_TEMPLATE_IMAGES . 'catSpacerR.gif', 'spacer'); ?>
</div>

Stylesheet.css

#mainWrapper { background-color: #FFF; text-align: left; width: 1032px; vertical-align: top;}
#headerCat {float: left; margin: 14px 0 0 70px;}
.search {float: left;}
#headerCatInfo{float: left; font-family: Arial, Helvetica, sans-serif; Font-size: 13pt; background-image: url(../images/catBG.gif);height: 29px; color: #0e5380; background-position: top; background-repeat: repeat-x;}
#headerCatInfo {font-weight: bold;}
#catContainer {position: relative; top-margin: 8px;}
#headerCatInfo img{vertical-align: middle; padding: 0 11px;}

If anyone can figure out why it's overlapping the categories is hanging outside of the main wrapper within mac os x i would greatly appreciate it. ANY IDEAS? I know there's some smart programmers out there that are smarter than me :)

13 Apr 2010, 6:05 PM
#3
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: TPL_HEADER problem v138a

At first glance I can see the Font size is bigger for the Mac version.

#headerCatInfo (line 362)
{
font-weight: bold;
}

Suggestion: comment out the above then fiddle with Font Family to adjust.

A deeper look shows HTML Validation errors, although not evidently directly connected to your problem, once corrected should help to sort out things in general.

13 Apr 2010, 6:48 PM
#4
cs_jono avatar

cs_jono

Inactive

Join Date:
Oct 2007
Posts:
187
Plugin Contributions:
0

Re: TPL_HEADER problem v138a

Website Rob:

At first glance I can see the Font size is bigger for the Mac version.

#headerCatInfo (line 362)
{
font-weight: bold;
}

Suggestion: comment out the above then fiddle with Font Family to adjust.

A deeper look shows HTML Validation errors, although not evidently directly connected to your problem, once corrected should help to sort out things in general.

Thanks for your help! Unfortunately that didn't work. The problem was fixed on MAC OSX (partially) but it messed things up on windows.

Any other ideas or suggestions?

Thanks zen cart community!

13 Apr 2010, 6:54 PM
#5
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: TPL_HEADER problem v138a

Best to wait on further suggestions until you've corrected the HTML. Some of the errors are definitely causing overall problems and until they are fixed, no need to guess on fixes that might or might not work.

13 Apr 2010, 6:58 PM
#6
dbltoe avatar

dbltoe

Totally Zenned

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

Re: TPL_HEADER problem v138a

Rob's suggestion of fixing the html errors (50+) will definitely give you a better foundation to work on.

Some of them are obviously not your problem, but unclosed img and a tags can really mess with a layout.

13 Apr 2010, 7:06 PM
#7
cs_jono avatar

cs_jono

Inactive

Join Date:
Oct 2007
Posts:
187
Plugin Contributions:
0

Re: TPL_HEADER problem v138a

Website Rob:

Best to wait on further suggestions until you've corrected the HTML. Some of the errors are definitely causing overall problems and until they are fixed, no need to guess on fixes that might or might not work.

I'm sorry I'm really not trying to sound ignorant or stupid...but when I'm looking at the validation errors for the code there is 11 of them and if that was the problem wouldn't they cause the problem on the windows operating system too? I'm sorry...I'm just trying to learn from you guys.

Thanks for your patience!

13 Apr 2010, 7:24 PM
#8
dbltoe avatar

dbltoe

Totally Zenned

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

Re: TPL_HEADER problem v138a

Tidy plug-in for Firefox shows 59 on the page you provided.
The "fun" seems to start on line one with> <div class="socialIcons"><a href="[http://www.facebook.com/clevershoppers](http://www.zen-cart.com/forum/view-source:http://www.facebook.com/clevershoppers)"><img src="[images/home/socialNetwork/facebook.gif](http://www.zen-cart.com/forum/view-source:http://www.clevershoppers.com/jono/zencart138a/images/home/socialNetwork/facebook.gif)" alt="Clevershoppers on Facebook"/></a><br /><a href="[http://www.twitter.com/clevershoppers](http://www.zen-cart.com/forum/view-source:http://www.twitter.com/clevershoppers)"><img src="[images/home/socialNetwork/twitter.gif](http://www.zen-cart.com/forum/view-source:http://www.clevershoppers.com/jono/zencart138a/images/home/socialNetwork/twitter.gif)" alt="Clevershoppers on Twitter" class="socialIcon"/><br /><a href="[http://www.youtube.com/clevershoppers](http://www.zen-cart.com/forum/view-source:http://www.youtube.com/clevershoppers)"><img src="[images/home/socialNetwork/youtube.gif](http://www.zen-cart.com/forum/view-source:http://www.clevershoppers.com/jono/zencart138a/images/home/socialNetwork/youtube.gif)" alt="Clevershoppers on Youtube" class="socialIcon" /></div>which should look something like> <div class="socialIcons"><a href="[http://www.facebook.com/clevershoppers](http://www.zen-cart.com/forum/view-source:http://www.facebook.com/clevershoppers)"><img src="[images/home/socialNetwork/facebook.gif](http://www.zen-cart.com/forum/view-source:http://www.clevershoppers.com/jono/zencart138a/images/home/socialNetwork/facebook.gif)" alt="Clevershoppers on Facebook"/></a><br /><a href="[http://www.twitter.com/clevershoppers](http://www.zen-cart.com/forum/view-source:http://www.twitter.com/clevershoppers)"><img src="[images/home/socialNetwork/twitter.gif](http://www.zen-cart.com/forum/view-source:http://www.clevershoppers.com/jono/zencart138a/images/home/socialNetwork/twitter.gif)" alt="Clevershoppers on Twitter" class="socialIcon"/></a><br /><a href="[http://www.youtube.com/clevershoppers](http://www.zen-cart.com/forum/view-source:http://www.youtube.com/clevershoppers)"><img src="[images/home/socialNetwork/youtube.gif](http://www.zen-cart.com/forum/view-source:http://www.clevershoppers.com/jono/zencart138a/images/home/socialNetwork/youtube.gif)" alt="Clevershoppers on Youtube" class="socialIcon" /></a></div>and line five with > <div class="moreInfoBtn"><a href="[http://www.clevershoppers.com/music-9/pop-32/casting-crowns-until-the-whole-world-hears-cd-2-71104.html](http://www.zen-cart.com/forum/view-source:http://www.clevershoppers.com/music-9/pop-32/casting-crowns-until-the-whole-world-hears-cd-2-71104.html)"><img src="[images/home/slideshow/moreInfo.gif](http://www.zen-cart.com/forum/view-source:http://www.clevershoppers.com/jono/zencart138a/images/home/slideshow/moreInfo.gif)" alt="Get more information on Casting Crowns: Until The Whole World Hears CD 2009"></a></div>which should be something like> <div class="moreInfoBtn"><a href="[http://www.clevershoppers.com/music-9/pop-32/casting-crowns-until-the-whole-world-hears-cd-2-71104.html](http://www.zen-cart.com/forum/view-source:http://www.clevershoppers.com/music-9/pop-32/casting-crowns-until-the-whole-world-hears-cd-2-71104.html)"><img src="images/home/slideshow/moreInfo.gif" alt="Get more information on Casting Crowns: Until The Whole World Hears CD 2009" /></a></div>Sometimes it's the small stuff:yes:

13 Apr 2010, 10:14 PM
#9
cs_jono avatar

cs_jono

Inactive

Join Date:
Oct 2007
Posts:
187
Plugin Contributions:
0

Re: TPL_HEADER problem v138a

Not trying to be obnoxious but the code which you talk about where it doesn't validate is on the define main page. But the categories is effected no matter which page you are on. How could the define main page effect the header on every page the header is on? Is that really possible?

13 Apr 2010, 10:43 PM
#10
dbltoe avatar

dbltoe

Totally Zenned

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

Re: TPL_HEADER problem v138a

Understood.
These are a few of the 59, but notice that they are in the source on lines 1 and 5.
For instance the column layout loads left, right, center.
Other items are not necessarily loaded in order of the viewed layout.
If this only results in fixing html errors, it at least clears some of the trees out of the forest.
Sometimes it's that a clear both is missing or added. It's just hard to tell now.
Have you validated the css?

13 Apr 2010, 11:16 PM
#11
dbltoe avatar

dbltoe

Totally Zenned

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

Re: TPL_HEADER problem v138a

:shocking:
I need to get the trifocals adjusted. Those items are not at the top of the source:oops:
Back to looking:blush: