Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Header logo


Jarris

Recommended Posts

Hi all

 

Man, I've searched for this until my eyes have gone sore.

 

I need to centre my company logo in the top header. I've found this in the header.php code:

 

 

<td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES .

 

'oscommerce.gif', 'The Nostalgic Print Co.') . '</a>'; ?></td>

 

 

it says 'middle' but my logo is left aligned. Am I looking in the wrong place? I thought I was close because I managed to change the tag from osCommerce my company name (see above) in the same code.

 

so, help much appreciated, ta

 

Jon

Link to comment
Share on other sites

Firstly you are using valign="middle" which will align your logo *vertically* in the table cell. Change this to align="center" to align it horizontally in the cell. To align it center of the store, remove/comment out the the table cell next to the one your logo is in:

 

<td align="right" valign="bottom"><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a>  <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a>  <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?>  </td>

Link to comment
Share on other sites

Thanks for your reply Jason.

 

However, I've done as you've said but the logo is still aligned left. Have I missed something?

 

This is how it looks now

 

<td valign="center"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'The Nostalgic Print Co.') . '</a>'; ?></td>

 

</tr>

</table>

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

<tr class="headerNavigation">

<td class="headerNavigation">  <?php echo $breadcrumb->trail(' » '); ?></td>

<td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a>  |  <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a>   </td>

</tr>

 

 

 

Jon

www.nostalgic-prints.com/catalog

Link to comment
Share on other sites

Thanks for your reply Jason.

 

However, I've done as you've said but the logo is still aligned left. Have I missed something?

 

This is how it looks now

 

<td valign="center"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'The Nostalgic Print Co.') . '</a>'; ?></td>

 

change this to align, not valign :

<td align="center"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR

Link to comment
Share on other sites

  • 4 weeks later...
Hi all

 

Man, I've searched for this until my eyes have gone sore.

 

I need to centre my company logo in the top header. I've found this in the header.php code:

<td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES .

 

'oscommerce.gif', 'The Nostalgic Print Co.') . '</a>'; ?></td>

it says 'middle' but my logo is left aligned. Am I looking in the wrong place? I thought I was close because I managed to change the tag from osCommerce my company name (see above) in the same code.

 

so, help much appreciated, ta

 

Jon

Link to comment
Share on other sites

Hi all

 

Man, I've searched for this until my eyes have gone sore.

 

I need to centre my company logo in the top header. I've found this in the header.php code:

<td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES .

 

'oscommerce.gif', 'The Nostalgic Print Co.') . '</a>'; ?></td>

it says 'middle' but my logo is left aligned. Am I looking in the wrong place? I thought I was close because I managed to change the tag from osCommerce my company name (see above) in the same code.

 

so, help much appreciated, ta

 

Jon

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...