Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Centering a header logo- need help


trdsport

Recommended Posts

Hello all, just installed the OS software via Fantastico and made some minor changes to it, including uploading and installing my own header logo. However my logo is slightly shorter than the overall width of my store, and I cannot figure out how to center my logo up. I removed the small images at the top of my store for "my account", "cart contents" and "check out" so that freed up the top space for my logo. I am a novice user of PHP and scripting, but this one has me stumped for some reason.

 

I apologize if this topic has been covered, after searching for it I was not able to come up with anything for my particular situation. Also I hope that I have chosen the correct forum for this topic- if not, I apologize.

 

Thanks in advance for the help... and if you wish to see what I am talking about my website is www.mwmodeltrucking.com/shop you will see that my logo is alligned "LEFT" instead of center.

 

Jerry

Jerry B

Kansas City

Link to comment
Share on other sites

Hello all, just installed the OS software via Fantastico and made some minor changes to it, including uploading and installing my own header logo. However my logo is slightly shorter than the overall width of my store, and I cannot figure out how to center my logo up. I removed the small images at the top of my store for "my account", "cart contents" and "check out" so that freed up the top space for my logo. I am a novice user of PHP and scripting, but this one has me stumped for some reason.

 

I apologize if this topic has been covered, after searching for it I was not able to come up with anything for my particular situation. Also I hope that I have chosen the correct forum for this topic- if not, I apologize.

 

Thanks in advance for the help... and if you wish to see what I am talking about my website is www.mwmodeltrucking.com/shop you will see that my logo is alligned "LEFT" instead of center.

 

Jerry

 

hello....

go to catalog/includes/header.php and replace the following

 

<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr class="header">
<td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></td>
<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>
 </tr>
</table>

 

as

 

<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr class="header">
<td width="100%" valign="middle" align="center"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></td>
  </tr>
</table>

Link to comment
Share on other sites

Your osc is set to a width of 100% while your header image is a fixed size. So as the visitor changes the size of his page, the osc changes but the header stays fixed.

There are a few ways to fix it,

1. the easiest being to gradiate your header image from some color on the left slowly to white on the right. Since the osc is white bodied, the visitor can't tell where the header ends.

2. the proper way to fix this is to set your osc to a fixed width across your page. Download the 'centershop' contrib. This will fix your osc to a specific width size for every browser. It is pretty easy to install on your osc and the results are professional looking.

man of a reformed faith.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...