Forums / Templates, Stylesheets, Page Layout / background images disappears in my account pages

background images disappears in my account pages

Locked

Views: 1,654

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
21 Aug 2006, 7:58 PM
#1
paulfromwales avatar

paulfromwales

Zen Follower

Join Date:
Aug 2006
Posts:
102
Plugin Contributions:
0

background images disappears in my account pages

O the site the BG image appears fine, but when you go to pages in my account and checkout the background images disappears, it goes to a white background.

Any ideas?

21 Aug 2006, 11:25 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: background images disappears in my account pages

If you post your site URL we can probably tell you exactly what's happening.

Without that info, I can speculate that your my account and checkout page IDs may be specifying in the CSS stylesheet a background color (white) which covers the general background image.

21 Aug 2006, 11:58 PM
#3
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,684
Plugin Contributions:
0

Re: background images disappears in my account pages

Did you use absolute URLs for those images instead of the relative path?

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

22 Aug 2006, 10:12 AM
#4
paulfromwales avatar

paulfromwales

Zen Follower

Join Date:
Aug 2006
Posts:
102
Plugin Contributions:
0

Re: background images disappears in my account pages

Hi Guys

In the CSS file i gave the relative path for the images which works fine apart from my account and checkout pages.

site url (checkout): https://web30.secure-secure.co.uk/edenspirit.co.uk/index.php?main_page=login

normal page: https://www.edenspirit.co.uk/index.php

Thanks guys, still very new to all this, but i think its great with excellent support

22 Aug 2006, 10:32 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,515
Plugin Contributions:
176

Re: background images disappears in my account pages

This won't work for you:```
background-image: url(/images/bg1.gif);


the / before images/bg1.gif  is causing your problems.

on your main site, it's fine:
<http://yoursite.com/images/bg1.gif>
but on your secure site, it becomes:
<https://securesite.com/images/bg1.gif>
instead of:
<https://securesite.com/yourdomain/images/bg1.gif>

That's why you'll find that template graphics are better put in the /includes/templates/yourtemplate/images folder.  That way it would be used like this:

background-image: url(../images/bg1.gif);
The ../ denotes "relative to the css file path", which is located at:
/includes/templates/yourtemplate/css/stylesheet.css
thus, if your image file is at:
/includes/templates/yourtemplate/images/bg1.gif
then it will load properly with both secure and non-secure URL's.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

22 Aug 2006, 5:07 PM
#6
paulfromwales avatar

paulfromwales

Zen Follower

Join Date:
Aug 2006
Posts:
102
Plugin Contributions:
0

Re: background images disappears in my account pages

Thanks Doc

I added '..' before /images/bg1.gif); so it become (../images/bg1.gif);and there you go, job done

Cheers