Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1
    Join Date
    Jul 2006
    Posts
    49
    Plugin Contributions
    0

    centering header image with tpl_header.php

    [FONT="Arial"]I've read a lot of the posts on this site about centering the header image, and almost all of them say to edit the table properties located in the tpl_header.php file. The problem that I am having is that there are no table properties in my tpl_header.php file, and was curious as to whether or not there would be any other way to center it?[/FONT]

  2. #2
    Join Date
    Jul 2006
    Posts
    50
    Plugin Contributions
    2

    Default Re: centering header image with tpl_header.php

    As far as I could tell, you probably want to use CSS and change the properties of #mainWrapper so that everything on the page is centered.

    If you are just concerned about the header, change the properties of #headerWrapper.

  3. #3
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: centering header image with tpl_header.php

    Actually I think you will want to change the #logo from float: left to margin: auto;.

  4. #4
    Join Date
    Jul 2006
    Posts
    49
    Plugin Contributions
    0

    Default Re: centering header image with tpl_header.php

    Thank you for the reply. I did try your suggestion by adding the line text-align: center to #headerWrapper. It aligns the text on my page just fine but not the header image. Not really sure what to do know. I got my tpl_header from template_default_common, and since i cannot edit that file because there are no tables, i have no idea what to do now.

  5. #5
    Join Date
    Jul 2006
    Posts
    49
    Plugin Contributions
    0

    Re: centering header image with tpl_header.php

    Kim, I finally got it due to the fact you had mentioned the logo class. I added text-align: center to #logo instead of where I had before, and that worked now I just have about a 1/2 inch of space at the bottom of my logo, and have no idea on how to get rid of it? At least the image is now centered which was a big headache.

  6. #6
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: centering header image with tpl_header.php

    The URL of your site?

  7. #7
    Join Date
    Jul 2006
    Posts
    49
    Plugin Contributions
    0

    Default Re: centering header image with tpl_header.php


  8. #8
    Join Date
    Jul 2006
    Posts
    49
    Plugin Contributions
    0

    Idea or Suggestion Re: centering header image with tpl_header.php

    ok, nevermind, I finally found the solution to removing that space just beneath the header image here: http://www.zen-cart.com/forum/showth...t=header+space

    thanks for your help

  9. #9
    Join Date
    Jul 2006
    Posts
    74
    Plugin Contributions
    0

    Default Re: centering header image with tpl_header.php

    I am sooo blind when it comes to all this.. and not that GREAT for HTML..
    Can someone tell me in english how to make my "logo" centered?

    I Tried what you all were speaking of.. but I don't think I get it.

    here is my site.. http://www.kandiesforyou.com/shop

    Thanks so much
    http://www.kandiesforyou.com
    **Learning more and more everyday with the Zen-cart family**

  10. #10
    Join Date
    Jan 2005
    Location
    Lake Havasu, AZ
    Posts
    1,149
    Plugin Contributions
    0

    Default Re: centering header image with tpl_header.php

    Kirsten - I just looked at yours again and I see why yours won't center.

    You are using classic template - you need to look in /includes / templates / classic / common/tpl_header.php

    You will see in there that your logo is contained in a table that is set to be 200px wide. If you remove the sizing on that your logo will center (change to width="200" to width="100%" or else remove it entirely)

    Hope that helps get you going again :)
    When the world gets in my face I say Have A Nice Day.
    * I DO Think and I HAVE BEEN Zenned - therefore, I AM * I donate - do you?
    Custom Templates and Zen Services CRS Designs, Inc.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Problem with header - tpl_header
    By mbramble in forum General Questions
    Replies: 1
    Last Post: 25 Aug 2011, 04:40 PM
  2. So confusing tpl_header.php, header.php... etc..
    By neveu in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 23 Sep 2010, 03:20 PM
  3. Centering Header Image
    By Mailyfesux in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 22 Jul 2009, 04:42 AM
  4. Insert Image into Tpl_header.php
    By atheis in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 13 Aug 2008, 06:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg