Thread: Centering Logo

Results 1 to 10 of 31

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Centering Logo

    checked your site and to me your logo appears centered or am I missing something.

  2. #2
    Join Date
    May 2006
    Posts
    43
    Plugin Contributions
    0

    Default Re: Centering Logo

    Well for me it's not showing as centered. Cleared my cache and all that. Hmmm. Well now to figure out the columns.

    Andrea

  3. #3
    Join Date
    Oct 2005
    Location
    New Mexico
    Posts
    393
    Plugin Contributions
    0

    Default Re: Centering Logo

    I show centered in Firefox and left in IE6. But you did not do what Clyde suggested in the earlier post. You have -
    #logo, .centerBoxContents, .specialsListBoxContents, .categoryListBoxContents, .centerBoxContentsAlsoPurch, .attribImg {
    float: center;
    }
    While he suggests -
    #logo {text-align: center;}
    .centerBoxContents, .specialsListBoxContents, .categoryListBoxContents, .centerBoxContentsAlsoPurch, .attribImg {float: left;}
    Clyde knows more CSS than me but that looks like it would work.

    Clyde or Kuroi, why would you add float: center; in the logowrapper to do this?

  4. #4
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Centering Logo

    Clyde or Kuroi, why would you add float: center; in the logowrapper to do this?
    You shouldn't,
    Code:
    float: center
    is not a valid css selector.

  5. #5
    Join Date
    Oct 2005
    Location
    New Mexico
    Posts
    393
    Plugin Contributions
    0

    Default Re: Centering Logo

    Good reason not to do that!

    What is the proper command if not 'float'?

    Thanks

  6. #6
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: Centering Logo

    I use
    Code:
    text-align: center
    Although it says text-align: It seems to align anything within that particular DIV

    If you include an image in a selector i.e.:
    Code:
    #logo {background-image: url(../images/image.jpg);
    /*You can specify the image position with*/
    background-position: center center;}
    PS You can float: left or right but not center

  7. #7
    Join Date
    Oct 2005
    Location
    New Mexico
    Posts
    393
    Plugin Contributions
    0

    Default Re: Centering Logo

    Wow. Now I know that I don't really know anything about CSS. Thanks for the feedback.

  8. #8
    Join Date
    Dec 2005
    Posts
    105
    Plugin Contributions
    0

    Default Re: Centering Logo

    Hi there

    I've tried amending the code in the stylesheets as above but cannot seem to centre the logo either

    See www.oldersoftware.co.uk

    I've managed to change the width of the site and I'm v.happy with that - it was starting to look pretty cramped before.

    Thanks

    Phil

  9. #9
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Centering Logo

    Phil

    Your problem is rather different. You are using the tables-based Classic template (not recommended unless you are running a pre-1.3 version of Zen Cart). Your logo is ocntainined within a table cell and in the same row and to the right is another cell. Although that cell is empty, it is defined to have a width of 35% and so pushes back against the cell containing the logo preventing it from centering.

    I suggest that you go to your includes/templates/classic/common/tpl_header.php file and remove the redundant cell.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  10. #10
    Join Date
    Dec 2005
    Posts
    105
    Plugin Contributions
    0

    Default Re: Centering Logo

    Thanks for the reply - Brilliant response!

    Here is the code :

    <tr>
    <td align="left" valign="top" width="35%" class="headerNavigation">
    <a href="<?php echo zen_href_link(FILENAME_DEFAULT, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CATALOG; ?></a>&nbsp;|&nbsp;
    <?php if (isset($_SESSION['customer_id'])) { ?>
    <a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a>&nbsp;|&nbsp;
    <a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>
    <?php
    } else {
    if (STORE_STATUS == '0') {
    ?>

    Which bits of this do I remove?
    I did a search on 35%

    Thanks!

    Phil

 

 

Similar Threads

  1. v150 Centering Logo
    By AkashicLounge in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 31 Aug 2012, 01:30 AM
  2. centering logo
    By fw541c in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 22 Sep 2011, 11:32 AM
  3. Centering Logo
    By stokeflyer in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 2 Oct 2008, 03:09 PM
  4. Help centering logo. No gap between the logo and text!
    By toxicgtr in forum General Questions
    Replies: 4
    Last Post: 7 Jan 2007, 01:24 AM

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