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 / Trying to get the header larger than the rest of the pages

Trying to get the header larger than the rest of the pages

Started by alexthibo on 13 Aug 2013, 2:21 PM · Views: 3,350

Results 1 to 20 of 42
13 Aug 2013, 2:21 PM
#1
alexthibo avatar

alexthibo

New Zenner

Join Date:
Jul 2012
Posts:
99
Plugin Contributions:
0

Post #1 by alexthibo

Hi, I tried to find the answer in the forum but didn't so I'll try to explain what I need to do. I hope it will make since it will be hard to explain, english in not my mother tongue. Please be conciliant.

There's a website that i would like to install zencart on it. In fact, it is already installed and everything is working fine but I'm trying to modify the zencart template to looks like the website which is the problem.

The website adress is the following: http://www.fc4x4q.com. As you can see at the top there is a logo and a black line with the general menu on it. The website has his own stylesheet. I need to repeat this header over the zencart page which I'm not able to do.

I have followed the new custom tutorial (http://www.zen-cart.com/content.php?180-how-do-i-create-a-new-custom-template) and start to modified the original templates and was able to change few things but I'm blocked at this header problem.

The actual zencart page is at this adress: http://www.fc4x4q.com/boutique

I have to mention that I only have acces to the file concerning zencart, not the rest of the website files.

What I would like to do is to make it looks like this:

Note that all the logo part between the login and the categories has to be removed since the logo needs to be over that to keep the same dising has the actual website.

Is this even possible?
Can you help?

Thanks in advance.
Alex

13 Aug 2013, 3:15 PM
#2
alexthibo avatar

alexthibo

New Zenner

Join Date:
Jul 2012
Posts:
99
Plugin Contributions:
0

Post #2 by alexthibo

I was able to remove all the logo part by placing <div id="logoWrapper"> as a comment in tpl_header.php.

Still need help with the top to have it looks like the rest of the website.

13 Aug 2013, 4:53 PM
#3
gjh42 avatar

gjh42

Black Belt

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

Post #3 by gjh42

You say you don't have access to the main site code, but you can get it just by doing a view source. The header section has this HTML: ```html

<header> <div class="main wrap"> <h1><a href="index.html"><img src="images/logoFDQ.png" alt=""></a></h1> </div> <nav> <ul class="menu"> <li class="current"><a href="index.html">Accueil</a></li> <li><a href="membres.html">Devenez membre</a></li> <li><a href="form-partenaires.html">Devenez partenaire</a></li> <li><a href="contact.html">Nous contacter</a></li> </ul> <ul class="reseaux"> <a href="archives.html"><img src="images/pdf.jpg" width="37" height="26"></a> <a href="https://www.facebook.com/fc4x4q?fref=ts" target="_blank"><img src="images/facebook.jpg" width="37" height="26"></a><a href="https://www.youtube.com/user/FC4X4Q" target="_blank"><img src="images/youtube.jpg" width="37" height="26"></a> <a href="chroniques/chroniques_1.html"><img src="images/baroudeur_2.jpg" width="59" height="26"></a> </ul> <div class="clear"></div> </nav> </header> ``` You would take everything between (not including) the <header> and </header> tags and put it in tpl_header.php in the area where the logo was. You will need to change hrefs to full web addresses, and either put the images in the ZC /images/ folder or expand those to full URLs. ```html <a href="archives.html"><img src="images/pdf.jpg" .../>

<a href="http://www.fc4x4q.com/archives.html"><img src="http://www.fc4x4q.com/images/pdf.jpg" .../>

13 Aug 2013, 10:04 PM
#4
alexthibo avatar

alexthibo

New Zenner

Join Date:
Jul 2012
Posts:
99
Plugin Contributions:
0

Post #4 by alexthibo

Thanks gjh42. I gave it a try and it helped but I still have some problem with the fact that even if I place the code at the top of tpl_header.php it's still in the frame. I'm used to work with old html and table from old school but I have to learn how to work with <div> tags, css and php. I can't see how to put the top of the website out of the table... And I can't figure how to import what I need from the original website stylesheet (style.css) to the zencart one (stylesheet.css)...

Here's where I am now... : http://fc4x4q.com/boutique

14 Aug 2013, 5:30 AM
#5
gjh42 avatar

gjh42

Black Belt

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

Post #5 by gjh42

You don't currently have any of the main site header code in your Zen Cart header. Put it in just after <div id="headerWrapper">. Don't worry about the details of backgrounds and borders yet, just get the content showing. CSS can adjust the appearance of elements.

14 Aug 2013, 1:27 PM
#6
alexthibo avatar

alexthibo

New Zenner

Join Date:
Jul 2012
Posts:
99
Plugin Contributions:
0

Post #6 by alexthibo

It's because I removed it to try something else yesterday evening. I made a new page called boutique.php and I called the index.php as an include inside of it, under the menu. It worked but I get a gap that I can't remove.Here's a printscreen of what it gaves me.

It's almost what I'm trying to get but I don't think it's the good way to do it. But I'll leave that aside and I'll try again to do it as you say.

So, I added the main site header code in the header right after <div id="headerWrapper"> as you said. http://fc4x4q.com/boutique

I tried to add some code to the stylesheet from the one from the website. Not sure I did it right or add all the code I need... And the logo is not apearing either.

14 Aug 2013, 5:35 PM
#7
gjh42 avatar

gjh42

Black Belt

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

Post #7 by gjh42

Your <nav> element has a black background (#000000) which is hiding the logo because the nav is output after the logo. You need to put your desired header background in the #headerWrapper element so it will be below all content.

If you want the body background to show continuously behind the header content, you need to make sure there is no background or border for #mainWrapper, #headerWrapper or any sub-element of the header.

26 Aug 2013, 1:47 AM
#8
alexthibo avatar

alexthibo

New Zenner

Join Date:
Jul 2012
Posts:
99
Plugin Contributions:
0

Post #8 by alexthibo

I took few days of holiday with the familly but I now need to finish this. I hope gjh42 will still be available for help.

So, I removed the black background in the nav element. I also removed the border for #mainWrapper and #headerWrapper.

Now it looks like this:

As a reminder, I would like to havethe top to looks like this:

26 Aug 2013, 12:44 PM
#9
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Post #9 by stevesh

It appears to look the way you want it to here.

26 Aug 2013, 1:57 PM
#10
alexthibo avatar

alexthibo

New Zenner

Join Date:
Jul 2012
Posts:
99
Plugin Contributions:
0

Post #10 by alexthibo

The last image is a photoshop. You can see it here: http://fc4x4q.com/boutique/

I need to find a way to make the black medu bar larger that the zencart frame and to have the logo and the menu to show properly by having the logo to show over the menu. That's what I'm not able to do.

26 Aug 2013, 3:37 PM
#11
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Post #11 by stevesh

No, before I posted #9 this morning, I went to your site and it looked exactly as it does in your ideal image. It doesn't now, so I'd undo whatever you've done since.

26 Aug 2013, 9:54 PM
#12
alexthibo avatar

alexthibo

New Zenner

Join Date:
Jul 2012
Posts:
99
Plugin Contributions:
0

Post #12 by alexthibo

stevesh:

No, before I posted #9 this morning, I went to your site and it looked exactly as it does in your ideal image. It doesn't now, so I'd undo whatever you've done since.

I didn't change anything since like 2 weeks. :blink: I'm pretty sure what you saw is the rest of the actual website that I want Zencart to look like.

28 Aug 2013, 4:56 PM
#13
alexthibo avatar

alexthibo

New Zenner

Join Date:
Jul 2012
Posts:
99
Plugin Contributions:
0

Post #13 by alexthibo

Nobody else can help? :lookaroun I really need to get thru this.

28 Aug 2013, 5:34 PM
#14
gjh42 avatar

gjh42

Black Belt

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

Post #14 by gjh42

You would want to make the mainWrapper 100% width so the headerWrapper can have a background-image that extends full width. Then the rest of the elements need their widths and margins adjusted to get them back in the original layout.```
#mainWrapper {width: 100%;}
#contentMainWrapper {width: 960px; margin: auto;}

28 Aug 2013, 6:07 PM
#15
alexthibo avatar

alexthibo

New Zenner

Join Date:
Jul 2012
Posts:
99
Plugin Contributions:
0

Post #15 by alexthibo

Ok, i'll try that!

29 Aug 2013, 1:10 AM
#16
alexthibo avatar

alexthibo

New Zenner

Join Date:
Jul 2012
Posts:
99
Plugin Contributions:
0

Post #16 by alexthibo

I made the modification to the stylesheet on #mainWrapper and #contentMainWrapper but now I'm totally lost... :(

29 Aug 2013, 2:06 AM
#17
gjh42 avatar

gjh42

Black Belt

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

Post #17 by gjh42

You left the margin: auto; out of #contentMainWrapper.

To get the black bar in the header, you need to make an image of the right height (it can be just a few pixels wide), save it in /includes/templates/your_template/images/, and use that as the background for #headerWrapper.

#headerWrapper { background: url(../images/headerbar.gif) bottom repeat-x;}

You will need to rework the styling and perhaps the sequence to get the logo and menu aligned the way you want. I notice that you have the logo position styling applied to h1; this means that all h1 elements (Zen Cart automatically generates h1 tags for the most important heading on each page) will have the logo styling, which is bad. The logo should not be an h1 - there can be only one h1 per page, and it should be reserved for meaningful page content.

29 Aug 2013, 2:32 AM
#18
alexthibo avatar

alexthibo

New Zenner

Join Date:
Jul 2012
Posts:
99
Plugin Contributions:
0

Post #18 by alexthibo

gjh42:

You left the margin: auto; out of #contentMainWrapper.

To get the black bar in the header, you need to make an image of the right height (it can be just a few pixels wide), save it in /includes/templates/your_template/images/, and use that as the background for #headerWrapper.

#headerWrapper { background: url(../images/headerbar.gif) bottom repeat-x;}

Ok, That's done, but the black bar do not shows. I never had so much hard time with coding before. I feel so dumb and clumsy... I'm so lost in minor knowledge oh PHP and stylesheets! I'm learning a lot right now!

> **gjh42:**
>
> You will need to rework the styling and perhaps the sequence to get the logo and menu aligned the way you want. I notice that you have the logo position styling applied to h1; this means that all h1 elements (Zen Cart automatically generates h1 tags for the most important heading on each page) will have the logo styling, which is bad. The logo should not be an h1 - there can be only one h1 per page, and it should be reserved for meaningful page content. Ok. I'll need help for that too but can you continue to help with the header first? Maybe wo could look at this after?
29 Aug 2013, 4:03 AM
#19
gjh42 avatar

gjh42

Black Belt

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

Post #19 by gjh42

Immediately after <div id="headerWrapper"> you need to add <div id="headerContent">. Then above the </div> that closes the headerWrapper div, add another </div> to close headerContent.
Now you can add to your stylesheet```
#headerContent {width: 960px; margin: auto;}

What did you name your black bar image? That is the name you need to use in the stylesheet rule. Where did you save the image?