Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Centering Header Image


Guest

Recommended Posts

Can some one tell me how to center my image in the header?

This is the code that i am using.

 

(DIR_WS_IMAGES . 'oscommerce.gif', 'Persuader Lures') . '</a>'; ?></td>

<td align="Center" valign="bottom"><?php echo '<a href="' . tep_href_link

 

My site www.persuaderlures.com/catalog

 

Thanks

Link to comment
Share on other sites

it should look something like this in your header.php...

 

<td align="center"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'Persuader Lures') . '</a>';  ?></td>

Link to comment
Share on other sites

That particular td centres the three right hand images. To centre the header, you need to find the td before it and add your align="middle" there instead.

 

Should look something like this:

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

 

Edit: Whoops - Jason beat me to it.

Link to comment
Share on other sites

That particular td centres the three right hand images. To centre the header, you need to find the td before it and add your align="middle" there instead.

 

<snip>

 ? ?<td valign="middle" align="middle">

Just thought I'd point out that to align a cell from left to right, the correct syntax is ALIGN="center", not ALIGN="middle". ( 'Middle' works with the VALIGN element, when aligning a cell from top to bottom. )

 

HTH,

 

Terry

Terry Kluytmans

 

Contribs Installed: Purchase Without Account (PWA); Big Images, Product Availability, Description in Product Listing, Graphical Infobox, Header Tags Controller, Login Box, Option Type Feature, plus many layout changes & other mods of my own, like:

 

Add order total to checkout_shipment

Add order total to checkout_payment

Add radio buttons at checkout_shipping (for backorder options, etc.)

Duplicate Table Rate Shipping Module

Better Product Review Flow

 

* If at first you don't succeed, find out if there's a prize for the loser. *

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...