Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Background picture instead of color?


Guest

Recommended Posts

Only thing different fron a stantard install is I have the CenterShop contrib. installed. I would like to use a background image (behind/below the store) instead of just a color.

 

Any ideas?

Link to comment
Share on other sites

Hi,

 

Only thing different fron a stantard install is I have the CenterShop contrib. installed.  I would like to use a background image (behind/below the store) instead of just a color.

 

This is how we did it, .........

 

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="images/BG.gif">

 

but it would be more efficient to modify the stylesheet.

 

Peter

Link to comment
Share on other sites

Hi,

This is how we did it, .........

 

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" background="images/BG.gif">

 

but it would be more efficient to modify the stylesheet.

 

Peter

 

 

I thought about doing it in the css also, just couldn't get it to work by adding only the standard html you would thing would work.

Link to comment
Share on other sites

Hi,

 

To do it in the stylesheet do this .....

 

td.infoBoxHeadingLT, .infoBoxHeading, .productListing-heading {
background: url(images/infoboxheading.gif);
}

 

of course do it, for the class you want to modify, possibly the 'body' class/id/element.

 

Peter

Link to comment
Share on other sites

I did a different version of background image, in case this is helpful to anyone... this works for a background image that is different on the top behind the header, but can repeat down the rest of the page. (See my site for an example.)

 

I put the whole site inside a new table with two rows, one column. Then you can put one background image in the top cell behind the header, and another background image in the bottom cell for the rest of the page. And that bottom image can be 1 pixel high, to repeat down the page without taking a long time to download.

 

To do this, just put the following in includes/header.php right under the body tag:

<table width="100%" height="100%" cellpadding="0" cellspacing="0">
<tr><td background="../images/top_image_name.gif">

 

Then put this in the same header.php file at the very bottom:

</td></tr>
<tr><td background="../images/bottom_image_name.gif">

 

And then open includes/footer.php and put this code right BEFORE the closing body tag:

</td></tr></table>

 

 

One final thing to keep in mind for any background image... you'll have to get rid of all the white background styles in the stylesheet, because they won't let you see the image "through" whatever they apply to.

 

Hope this helps someone!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...