Forums / Basic Configuration / Centering Logo

Centering Logo

Locked

Views: 7,898

Results 21 to 31 of 31
This thread is locked. New replies are disabled.
9 Jul 2006, 11:55 PM
#21
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Centering Logo

babydi77:

I'm going to keep working on this but it is puzzling me. My banner is centered in IE and Avant but not Firefox (which I use most). https://www.memories-forever.net/shoppingThis CSS from your stylesheet> #logo, {text-align: center;} .centerBoxContents, .specialsListBoxContents, .categoryListBoxContents, .centerBoxContentsAlsoPurch, .attribImg {

float: left

} should read> #logo {
text-align: center;

}

.centerBoxContents, .specialsListBoxContents, .categoryListBoxContents, .centerBoxContentsAlsoPurch, .attribImg {

float: left

}

Kuroi Web Design and Development | Twitter

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

9 Jul 2006, 11:57 PM
#22
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Centering Logo

This line in your stylesheet.css needs to be corrected:

#logo, {text-align: center;} .centerBoxContents, .specialsListBoxContents, .categoryListBoxContents, .centerBoxContentsAlsoPurch, .attribImg {

	float: left

	}

Change it as follows:


#logo {text-align: center;}

 .centerBoxContents, .specialsListBoxContents, .categoryListBoxContents, .centerBoxContentsAlsoPurch, .attribImg {

	float: left

	}

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

10 Jul 2006, 12:38 AM
#23
babydi77 avatar

babydi77

New Zenner

Join Date:
Dec 2005
Posts:
40
Plugin Contributions:
0

Re: Centering Logo

OMGosh, LOL. Thank you! Both of you!

Diana

4 Aug 2006, 3:13 PM
#24
philpalmer avatar

philpalmer

Zen Follower

Join Date:
Dec 2005
Posts:
105
Plugin Contributions:
0

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 https://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

4 Aug 2006, 3:58 PM
#25
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

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)

4 Aug 2006, 4:06 PM
#26
philpalmer avatar

philpalmer

Zen Follower

Join Date:
Dec 2005
Posts:
105
Plugin Contributions:
0

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> | 
<?php if (isset($_SESSION['customer_id'])) { ?>
          <a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a> | 
          <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

4 Aug 2006, 4:16 PM
#27
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Centering Logo

The bit you want is further on than this and I'm not very familar with it or how it varies from version to version as I steer clear of this template. However, the code you want will look similar, but I suspect not identical, to this> <table border="0" width="100%" cellspacing="0" cellpadding="0" class="header">

      <tr><!-- All HEADER_ definitions in the columns below are defined in includes/languages/english.php //-->

<td valign="middle" height="<?php echo HEADER_LOGO_HEIGHT; ?>" width="<?php echo HEADER_LOGO_WIDTH; ?>">

<?php echo '<a href="' . zen_href_link(FILENAME_DEFAULT) . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?>
        </td>

<td align="center" valign="top">

<?php if (HEADER_SALES_TEXT != '') { echo HEADER_SALES_TEXT; } if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2)) { if ($banner->RecordCount() > 0) { echo zen_display_banner('static', $banner); } } ?>
        </td>
      </tr>
    </table>The cell highlighted in green is for the logo, the only in red is for the tagline which I suspect you have turned off, which is why the cell is empty once the php has been processed. I'd search for the HEADER_SALES_TEXT constant and then delete or comment out everything from the <td before it to the </td> afterwards inclusive.

Kuroi Web Design and Development | Twitter

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

4 Aug 2006, 4:24 PM
#28
philpalmer avatar

philpalmer

Zen Follower

Join Date:
Dec 2005
Posts:
105
Plugin Contributions:
0

Re: Centering Logo

I'll have a play.

Thanks!

5 Aug 2006, 9:50 PM
#29
lala_g_clef_jewelry avatar

lala_g_clef_jewelry

Zen Follower

Join Date:
Apr 2006
Location:
Kansas
Posts:
233
Plugin Contributions:
0

Re: Centering Logo

gah errr.. :blink:

ive tried the changes to the css file suggested, yet i can not get my logo centered :(

(and i have yet to map it)

am i not editing the correct css file? i have edited and uploaded the file in my future_zen folder. should i be uploading this else where too?

G Clef Jewelry
Dichroic and Beaded Jewelry

5 Aug 2006, 10:01 PM
#30
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Centering Logo

Lala_G_Clef_Jewelry:

gah errr.. :blink:

ive tried the changes to the css file suggested, yet i can not get my logo centered :(

(and i have yet to map it)

am i not editing the correct css file? i have edited and uploaded the file in my future_zen folder. should i be uploading this else where too?You're doing all the right things, you just need to remove the line marked in red below as it is getting in the way> #logo {

display:inline;
margin: 10px 0 0 10px;

}

Kuroi Web Design and Development | Twitter

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

5 Aug 2006, 10:05 PM
#31
lala_g_clef_jewelry avatar

lala_g_clef_jewelry

Zen Follower

Join Date:
Apr 2006
Location:
Kansas
Posts:
233
Plugin Contributions:
0

Re: Centering Logo

:thumbsup:

that worked!!!

thanks again Kuroi! huggles

G Clef Jewelry
Dichroic and Beaded Jewelry