Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Image problem in header


khaaliq

Recommended Posts

Posted

I am trying to put an image in header.php that will cover the whole header section of my cart. Can anyone tell me how I get the image to adjust to different browser resolutions? What is the actual size that I should make the image?

Posted

Well....the process will dpend a little on the type of image you are using.....Do you want to have it repeated to fill the space or stretched to file the space ...Stay the same size with "fillers" around it. More details?

Posted

On the site you used as an example, the sunflowers on the right fading into solid color on the left is a fixed widthand height .gif image.

 

For an image similar to that you can hardcode it into the header or use the stylesheet to insert it into the header dynamically.

Posted

If that is what was done that is not what I mean :D

 

I want the image to stretch accross the top of the page.

Posted

Find the section of code listed below in catalog/includes/header.php. Put your background color in the table or use the header class in the stylesheet . The background color should match the background color of your logo image. Put your logo where it says YOURLOGO.gif

 

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

  

<tr class="header">

     

 <td valign="middle">

	 <?php echo tep_image(DIR_WS_IMAGES . 'YOURLOGO.gif', 'Your Shop Name'); ?>

 </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, '', 'NONSSL') . '">

	 ' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '

 </a>

   

 <a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '">

	 ' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '

 </a>

 '; ?>  

</td>

  

</tr>

</table>

  • 3 months later...
Posted

In header.php I use a company logo for the "oscommerce.gif" image. I like it this way with that image being a link. I would like to place an image in the background that will stretch to any browser width. My image is of clouds and is 800 pixels wide. IT looks fine when I stretch it so I am not worried about that. I can get the image to show up using the Style sheet but how do I get it to stretch to 100% of the table width? HEre is my bit of code in my stylesheet that shows my image but tiles it:

 

TD.headerError {

 font-family: Tahoma, Verdana, Arial, sans-serif;

 font-size: 12px;

 background-image: url(/catalog/images/clouds2wide.jpg);

 color: #ffffff;

 font-weight : bold;

 text-align : center;

 

Thank you for any help!!

-Richard

-Richard

---------------------------------------------------

Where would I be without the Forums?!?!

Archived

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

×
×
  • Create New...