Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Nearly ready to go live, but for background image problem


Guest

Recommended Posts

Posted

How can I get the background images defined in the stylesheet to show in the secure pages? Everything else is showing up fine.

my site

 

Can anyone help me with this last hurdle?

Posted

Hi,

 

You can set a background image in the css file using the following code;

 

BODY {

 background: images/body.gif;

}

 

where body.gif is your background image.

Reddy to Rumble

 

Thank you osCommerce and all who Contribute to her!

Posted

sorry!!! i misread your request!

 

instead of images/body.gif use the full secure url to your background image eg

 

BODY { 

 background: https://www.yoursite.com/catalog/images/body.gif; 

}

Reddy to Rumble

 

Thank you osCommerce and all who Contribute to her!

Posted
sorry!!! i misread your request!

 

instead of images/body.gif use the full secure url to your background image eg

 

BODY { 

 background: https://www.yoursite.com/catalog/images/body.gif; 

}

but won't that mess up the images in the non-secure pages?

Posted

i dont thinks so, give it a go! let me know

Reddy to Rumble

 

Thank you osCommerce and all who Contribute to her!

Posted
instead of images/body.gif use the full secure url to your background image eg

 

You can use a relative path in the stylesheet.css file as long as you have the image in the relative path for both you secure and non-secure servers.

 

Calling the image by the full url (i.e. https://) should show the image on the secure site, but not the non-secure site. Hence having the images on both servers.

 

Example code:

BODY {

background: #ffffff url(images/yourimage.gif) no-repeat fixed center 90px;

}

 

The #ffffff is for a white background, with the image fixed (doesn't scroll) in the center of the page horizontally, and 90px from the top vertifcally.

 

You can see the effect here: www.turningbase.com

(The body tag is the 'Turning Base' watermark, not the TB Wings logo)

 

HTH,

Tony

"The price of success is perseverance. The price of failure comes much cheaper."

Posted

:( It throws up a security error on the non-secure pages.

 

Thanks for trying to help though.

 

Any other suggestions, anyone?

Posted
instead of images/body.gif use the full secure url to your background image eg

 

You can use a relative path in the stylesheet.css file as long as you have the image in the relative path for both you secure and non-secure servers.

 

Calling the image by the full url (i.e. https://) should show the image on the secure site, but not the non-secure site. Hence having the images on both servers.

 

Example code:

BODY {

background: #ffffff url(images/yourimage.gif) no-repeat fixed center 90px;

}

 

The #ffffff is for a white background, with the image fixed (doesn't scroll) in the center of the page horizontally, and 90px from the top vertifcally.

 

You can see the effect here: www.turningbase.com

(The body tag is the 'Turning Base' watermark, not the TB Wings logo)

 

HTH,

Tony

 

 

I just tried Tony css code but with

 

Example code:

BODY {

background: #ffffff url(https://www.mysite.com/images/logo.gif ) no-repeat fixed center 90px;

}

 

And it worked on a non-secure and secure site no security errors

Reddy to Rumble

 

Thank you osCommerce and all who Contribute to her!

Posted

I've spoken to my host, who's confirmed that the files aren't held on the secure server, just routed through it.

The stylesheet is calling the background images from http://www.mysite.co.uk, which is why the don't show on the secure pages. I need to add the background images to the .php files directly.

 

How do I add a background image to this?

array('params' => 'width="100%" height="26" align="center" class="infoBoxHeadingText"', 'text' => $contents[0]['text']),

Posted

figured it out now :D

 

Thanks for pointing me in the right direction.

Archived

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

×
×
  • Create New...