Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

trouble getting background image in head with CSS


ollyno1uk2

Recommended Posts

Posted

Hi there

 

I have a small jpg file that I want tiled from left to right as my header background but i can not do it. on my site int he header I have 2 table rows. I only want this backround on the top row. IS there a way I can do this?

 

This is what i have tried:

 

in CSS adding background-image: url('images/head.jpg'); under tr.header I have also tried it in tr.haadernavigation

 

The best results this gives is half the image half the header down on both sides of my logo See My Page

 

Then I have tried adding it into the header itself by doing <tr background="images/head.jpg"> but this seems to do nothing as well.

 

If you see my site you will see my logo. the backgroundof this logo is the background of the header.

 

I hope this makes sense

 

Thanks

Posted

in catalog\includes\header.php around line 57 comment the following:

<td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce') . '</a>'; ?></td>

 

In catalog\stylesheet.css make the following change

 

change your tr.header to

TR.header {
 background: #ffffff url('images/oscommerce.gif');

 

Change the ffffff to what ever hex color you would like

 

You may also want to rename your image :D

Posted
in catalog\includes\header.php around line 57 comment the following:

<td valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce') . '</a>'; ?></td>

 

In catalog\stylesheet.css make the following change

 

change your tr.header to

TR.header {
 background: #ffffff url('images/oscommerce.gif');

 

Change the ffffff to what ever hex color you would like

 

You may also want to rename your image :D

 

 

Hi thanks but this is not quitre waht I wanted. I do not want the background to be the image. This image will stay where it is. the image this is the image that I want to set as teh background image. It will need to be tiled from left to right.

 

Thanks for your input

Posted

Sorry I have had a go on my test site but its a beyond my capabilities :(

 

However (And I may be wrong) I think that head.jpg image you are trying to use is probably to big, think its 500x500

 

What button pack are you using? I like the buy now button you have.

Posted
Sorry I have had a go on my test site but its a beyond my capabilities :(

What button pack are you using? I like the buy now button you have.

I'm not too sure but it is one off the contributions set. i thik it may be called aqua or sililar.

 

Thanks for your help

Posted

ok just in case anyone else was in the same position I sorted the problem.

 

It was the fact that the image had a lot of white around it. This caused the tiles to be much bigger than I though. I rezied the canvas to fit the image and it worked ok

 

Thanks

Archived

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

×
×
  • Create New...