Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Cant centre logo in header


Guest

Recommended Posts

Posted

Hi,

I hope someone can help me, I found a few threads on this but they must be for older versions as the code given is not the code in the header.php I have.

I would have thought this would be one of the easiest and most obvious things to do but I cant for the life of me alter the code in any way that takes any affect!

This is my current header.php code if any one could explain what I need to change I would appreciate it so much as this is driving me crazy

 

thanks!

 

 

<?php

/*

$Id$

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2010 osCommerce

 

Released under the GNU General Public License

*/

 

if ($messageStack->size('header') > 0) {

echo '<div class="grid_24">' . $messageStack->output('header') . '</div>';

}

?>

 

<div id="header" class="grid_24">

<div id="storeLogo"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></div>

 

<div id="headerShortcuts">

<?php

echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'cart', tep_href_link(FILENAME_SHOPPING_CART)) .

tep_draw_button(HEADER_TITLE_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) .

tep_draw_button(HEADER_TITLE_MY_ACCOUNT, 'person', tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));

 

if (tep_session_is_registered('customer_id')) {

echo tep_draw_button(HEADER_TITLE_LOGOFF, null, tep_href_link(FILENAME_LOGOFF, '', 'SSL'));

}

?>

</div>

 

<script type="text/javascript">

$("#headerShortcuts").buttonset();

</script>

</div>

 

<div class="grid_24 ui-widget infoBoxContainer">

<div class="ui-widget-header infoBoxHeading"><?php echo ' ' . $breadcrumb->trail(' » '); ?></div>

</div>

 

<?php

if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr class="headerError">

<td class="headerError"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['error_message']))); ?></td>

</tr>

</table>

<?php

}

 

if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr class="headerInfo">

<td class="headerInfo"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['info_message']))); ?></td>

</tr>

</table>

<?php

}

?>

Posted

You need the edit the storeLogo tag in /stylesheet.css-

 

change from this:

 

 

#storeLogo {

float: left;

margin-top: 5px;

}

 

to

 

#storeLogo {

margin: 0 auto:

margin-top: 5px;

text-align: center;

}

 

bear in mind that you made need to change some of the other header tags to make it all fit in nicely though

Posted

Oh thank you both! I'd tried float: center and align:center tags in the storelogo , ...finally all fixed! thank u!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...