khaaliq Posted December 23, 2002 Posted December 23, 2002 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?
Guest Posted December 23, 2002 Posted December 23, 2002 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?
khaaliq Posted December 23, 2002 Author Posted December 23, 2002 I am using a .gif file if that is what you mean by the type of image. I would like it to stretch to fill the space, like the image at the top of the page here http://www.naturessunshine.com
Guest Posted December 23, 2002 Posted December 23, 2002 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.
khaaliq Posted December 23, 2002 Author Posted December 23, 2002 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.
Guest Posted December 23, 2002 Posted December 23, 2002 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>
mcgyver7923 Posted April 7, 2003 Posted April 7, 2003 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?!?!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.