Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Editing header.php


joycekramer

Recommended Posts

I've been playing with this and can't figure out how to edit the header.php file so that it sets an image size to a percentage of the width of the browser screen.

 

My table width is set to 100%.

 

I originally had my <td as follows:

 

<td valign="middle"><BR><CENTER><?php echo '<a href="http://www.photographicjourney.com/index.php?cPath=1_17_21">' . tep_image (DIR_WS_IMAGES . 'Oshkosh_2004_header.gif', 'Oshkosh 2004') . '</a>'; ?></CENTER><BR></td>

 

One of my testers (an older lady who probably has her monitor resolution set at a low resolution) told me that she couldn't see the entire image at the top without scrolling over. When I looked at the source (from the browser | view | source option) it shows up as:

 

<td valign="middle"><BR><CENTER><a href="http://www.photographicjourney.com/index.php?cPath=1_17_21"><img src="images/Oshkosh_2004_header.gif" border="0" alt="Oshkosh 2004" title=" Oshkosh 2004 " width="1000" height="100"></a></CENTER><BR></td>

 

The actual image size is width 1000 and height 100 so I suspect the default, if not specified, is to use actual size. Using my knowledge of html (since I have no knowledge of php :-), I edited the original so that it is as follows:

 

<td valign="middle"><BR><CENTER><?php echo '<a href="http://www.photographicjourney.com/index.php?cPath=1_17_21">' . tep_image (DIR_WS_IMAGES . 'Oshkosh_2004_header.gif', 'Oshkosh 2004', '750', '75') . '</a>'; ?></CENTER><BR></td>

 

That works fine. But I don't want the image size to be limited to 750 x 75. I want it to change with the resolution or with the size of the browser window. In HTML, I'd be able to replace 750 with something like 95%, or 90% and the image size would adjust accordingly. That doesn't seem to work here. Can someone tell me how to do this?

 

Thanks in advance for any help you can offer!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...