Jarris Posted February 21, 2007 Posted February 21, 2007 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
jasonabc Posted February 21, 2007 Posted February 21, 2007 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> Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix
Jarris Posted February 21, 2007 Author Posted February 21, 2007 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
Guest Posted February 21, 2007 Posted February 21, 2007 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
jasonabc Posted February 21, 2007 Posted February 21, 2007 As Corinna said - you are still using valign. Change this to align (minus the 'v'). Jason My Contributions: Paypal Payflow PRO | Rollover Category Images | Authorize.net Invoice Number Fix
Jarris Posted February 21, 2007 Author Posted February 21, 2007 Hey thanks Guys You did say to do that Jason, sorry. Guess I was too eager! Thanks for your help, looks good now. Jon
Guest Posted March 17, 2007 Posted March 17, 2007 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
Guest Posted March 17, 2007 Posted March 17, 2007 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
Guest Posted March 17, 2007 Posted March 17, 2007 Hi Jon, After the <td valign="middle"> <div align="right"> Regards, peter_of_stirling
Recommended Posts
Archived
This topic is now archived and is closed to further replies.