Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problem with the header image


Samuel_D

Recommended Posts

Hi guys,

 

First off, thanks guys for OS COmmerce. Having a good time piecing my site together and its been relatively trouble free up until now.

 

The problem, the header image wont seem to work. (see www.nilfix.co.uk)

 

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

  <tr class="header">

    <td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'nilfixlogo.jpg', 'nilfixlogo') . '</a>'; ?></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) . '">' . 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>

  </tr>

</table>

 

The above is taken from the header.pho file and

 

TR.header {

  background-image: url(http://www.nilfix.co.uk/images/nilfixlogo.jpg);

  background-attachment: fixed;

background-repeat: repeat;

 

is taken from the style sheet.

 

I've inserted the image in at the top any how for you to see what it should be however when I remove it, it reduces the image down to a small bit at the very top of it. Also, there seems to be a few other tables in at the top, though when I remove them I get a parse error. Can anyone help as this is driving me crazy.

Link to comment
Share on other sites

I'll remove the image so you can see what's happening, just wanted someone to see the way the image actually is first. I'd like it to resize itself when viewed under different resolutions.

Link to comment
Share on other sites

Anyone? As far as I can see, the table isn't resizing itself properly to accomadate the image. The image wont resize either to take up the full table. Is this because I have another table section to the left where it tails of?

Link to comment
Share on other sites

Guys, I've updated my header.php file now, so you should be able to see where the problem is happening now. (of course, I assume that you read this like you read a book)

 

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

  <tr class="header">

test

  </<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>

</table>

<?php

  if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {

?>

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

  <tr class="headerError">

    <td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td>

  </tr>

</table>

<?php

  }

 

  if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {

?>

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

  <tr class="headerInfo">

    <td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>

  </tr>

</table>

<?php

  }

 

?>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...