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 21 to 40 of 42
2 Sep 2013, 4:52 PM
#21
alexthibo avatar

alexthibo

New Zenner

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

Post #21 by alexthibo

I just noticed why I have so hard time making some modification to the code... Since I'm working on this from work on my ipad I'm using the app Code Anywhere to connect to the server and edit the files. It seems that this app are not saving all the change I make... Man...

3 Sep 2013, 7:55 AM
#22
alexthibo avatar

alexthibo

New Zenner

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

Post #22 by alexthibo

I was able to fix some of the thing that was messed up with Code Anywhere. I found a better app to work with so I should be able to easilly follow now.

The black band is now there but the menu is on the top instead of the logo (???)

3 Sep 2013, 6:48 PM
#24
alexthibo avatar

alexthibo

New Zenner

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

Post #24 by alexthibo

I tought it would be easy to just place the logo over the menu but it look in the good order in the code. I played with it and moves the nav tag or the divs but all it does is removing the black bar. The logo is called before the menu. Why does it show under it?

3 Sep 2013, 8:47 PM
#25
gjh42 avatar

gjh42

Black Belt

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

Post #25 by gjh42

You have your logo (which you have incorrectly identified as <h1>) styled with float: left;, and the following <ul> thus rises up to level with the logo's top. Change the float: left; to text-align: left; and see what happens.

Then look at the overall page source, and you will see that on every page there is your "h1" logo followed in the main content area by an <h1> relevant to the particular page. HTML rules are that there should only be one <h1> for a page, the main heading, and what you have will give validation errors if you run it through a validator. You should change the logo to something other than <h1>.

5 Sep 2013, 4:52 PM
#26
alexthibo avatar

alexthibo

New Zenner

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

Post #26 by alexthibo

I played with that and made some search on the best way to insert a logo. Many people are saying to use <H1> tags but I totaly understand what you explained. I also found this page which is quite interesting: http://csswizardry.com/2010/10/your-logo-is-an-image-not-a-h1/

So I tried to figure what tag I should use and tried it with the more logical one, <img>. S it gaves me that:

<div id="headerContent">	
<!--bof-header logo and navigation display-->                         
<?php                                                                 
if (!isset($flag_disable_header) || !$flag_disable_header) {          
?>                                                                    
<!--bof-navigation display-->
</div> 
       <nav> 
       <div class="main logowrap">
       		<a href="../index.html"><img src="../../../../../images/logoFDQ.png" alt=""></a> 
 

          <ul class="menu">
              <li><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 class="current"><a href="../boutique/boutique.php">Boutique</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="37" height="26"></a> 
         </ul>
</div>
</div>
```I also add some code in consequence to the CSS...

.main logowrap header {
display: inline-block;
float: left;
margin-left: 20px;
z-index: 111;
}


I simply copy the Main Wrap part of the CSSand rename it with logowarp... Not sure it's ok to do that... But the result is not really what I expected. You can see it. It seems to change inthe good way but it's so far of the result I need to get.

And I don't know how to replace the <ul> by something else.. And by what i need to replace it.

Also, it doesn't show the same way on the iPad. I suppose I could work on this issue when the rest will be fixed...
5 Sep 2013, 7:11 PM
#27
gjh42 avatar

gjh42

Black Belt

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

Post #27 by gjh42

You have some CSS usage errors. You have made this HTML <div class="main logowrap"> which assigns two different classes to the div, .main and .logowrap. Thus you need to rework your CSS:```
.main logowrap header {
display: inline-block;
float: left;
margin-left: 20px;
z-index: 111;
}

You have one element with two class tags, so you would use ```
.main.logowrap {
    display: inline-block;
    margin-left: 20px;
    z-index: 111;
}
``` Note that there is no space between .main and .logowrap.

Also, the   float: left; is not helping you; remove it from the rule.
6 Sep 2013, 1:07 PM
#28
alexthibo avatar

alexthibo

New Zenner

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

Post #28 by alexthibo

Ok thanks, I did that.

All the top section (logo + menu) needs to have the same larger than the section under the black band (960px). The black band is the only part that needs to have full width. So does the "margin-left: 20px;" really have a utility? Shouldn't I put all this, except the black band, in a <div> or something else and give it a width of 960px?

6 Sep 2013, 2:20 PM
#29
gjh42 avatar

gjh42

Black Belt

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

Post #29 by gjh42

If you want the logo exactly aligned with the left edge of the lower container, then you should eliminate the margin: 20px; (I didn't change your rule content, just its selectors)

The whole purpose of the headContent div is to hold the things that should have a 960px width.

6 Sep 2013, 4:00 PM
#30
alexthibo avatar

alexthibo

New Zenner

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

Post #30 by alexthibo

Great! I made some modifications and also saw that the </nav> was at the wrong place. Now it's getting closer to what I want.

The black band was too wide so I remade it and it now fits perfectly. In fact, the logo and the black band are now perfectly in place. The menu and its separations is to high and too much on the right (should me aligned with the logo).

Also, the green bar with "Accueil Connection" must be 960px wide too. How can I change this?

6 Sep 2013, 4:17 PM
#31
alexthibo avatar

alexthibo

New Zenner

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

Post #31 by alexthibo

Forgot to say that I used the padding used in <h1> in logowrap too to place it at the right place.```
padding: 8px 0 10px 1px;

11 Sep 2013, 5:06 PM
#32
alexthibo avatar

alexthibo

New Zenner

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

Post #32 by alexthibo

How can line up the menu with the black bars? I tried with the padding but it's always too high and too much on the right...

Still trying to make http://fc4x4q.com/boutique/ looking like http://fc4x4q.com/

11 Sep 2013, 11:54 PM
#33
alexthibo avatar

alexthibo

New Zenner

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

Post #33 by alexthibo

And how can I center the green bar under the black one? I tried many things, none are working. So tired to not be able to do that by myself...

12 Sep 2013, 3:02 PM
#35
alexthibo avatar

alexthibo

New Zenner

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

Post #35 by alexthibo

gjh42:

In your #navMainWrapper {} rule (line 284 in your stylesheet), use
margin: auto;
instead of
margin: 0;
Yes, it worked for the green bar. Thanks gjh42.

About the links in the black bar, i'm trying to place them exactly inline with the black bar. They are a little too hight. I removed the bottom pading in the .main.logowrap rule and they were aligned but with that modification it just raised the black bar at the menu level (which was then perfectly aligned) but it was too hing compare with the header on the rest of the wbsite. I really need to keep the black bar where it is and to lower the menu, and to align it on the left...

Can you help for that too?

13 Sep 2013, 4:10 AM
#36
gjh42 avatar

gjh42

Black Belt

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

Post #36 by gjh42

ul.menu li {
    background: url("../../../../../images/li.jpg") no-repeat scroll right 0 transparent;
    display: block;
    float: left;
    height: 55px;
    margin-top: 5px;
    text-align: center;
}

You might want to put the adjustment in the ul.menu li a {} rule if the active highlighting does not exactly fit your needs.

14 Sep 2013, 4:42 PM
#37
alexthibo avatar

alexthibo

New Zenner

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

Post #37 by alexthibo

I send you a MP on this.

25 Sep 2013, 5:19 AM
#38
alexthibo avatar

alexthibo

New Zenner

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

Post #38 by alexthibo

I remake it all from scratch and was able to make something great. It's almost done but there's some little bugs... I need some more help here. There's few thing I don't understand...

1- I used many stylesheets as a test while I was trying to make it work. I worked on different parts of the page on each of these different stylesheets. I renamed them but keep them on the directory css. In the end it appears that Zencart is using them all to have it work... In fact, there's currently no file with the name stylesheet.css in the css directory. How is this possible?

2- It appear that the overall page is wider then the page itself and I can't see why. There's few pixels over the right side that make a scrollbar to appear at the bottom. It shouldn't be there.

3- At the right of the black bars where the menu is located, there's some logos for the PDF archives, the Facebook page, etc (ul.reseaux). I'm trying to move them closer to the menu on their left to get them inside the 960 px line of the page but whatever I do the are always centered...

4- There's a part (headerWrapper) that I just can't center. It's always on the left...

http://www.fc4x4q.com/boutique/

Are gjh42 or someone else could explain or guide to the answers to these questions? Thanks!

25 Sep 2013, 12:14 PM
#39
stevesh avatar

stevesh

Black Belt

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

Post #39 by stevesh

  1. Zencart loads all stylesheets whose name starts with 'style' and have the .css extension that it finds in the current template's css folder. If you don't want a particular sheet loaded, remove it from that folder, or give it a different extension. Try fixing that and we'll go from there. There is a stylesheet.css file, but it's empty. What is style.css for ?
25 Sep 2013, 2:21 PM
#40
alexthibo avatar

alexthibo

New Zenner

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

Post #40 by alexthibo

Oh ok, that's why. Thanks. I'll clean that up and keep everything I need in one stylesheet and will tell when it's done.

Style.css is the stylesheet used on the rest of the website to wich I'm trying to add the zencart module and have the look similar.