Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Background image won't display

Background image won't display

Locked

Views: 3,582

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
23 Mar 2008, 11:32 PM
#1
dsewell avatar

dsewell

New Zenner

Join Date:
Mar 2008
Posts:
3
Plugin Contributions:
0

Background image won't display

All,

I had a background image which just repeated, it displayed ok. Then it stopped dispalying. Checked my folder permissions they are all at 755. Here is the Code from my style sheet. Any ideas?

body {
margin: 0;
background-image:url(http://www.ontargetairsoft.com/zenC/includes/templates/ontarget/images/background.gif%29;
background-repeat: repeat;
}

Thanks!

24 Mar 2008, 1:32 AM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: Background image won't display

The code that is actually in your stylesheet right now is a bit different from what you posted:```
body {
margin: 0;
font-family: verdana, arial, helvetica, sans-serif;
font-size: 62.5%;
color: #000000;
Background-Image: URL

(http://www.ontargetairsoft.com/zenC/includes/templates/ontarget/images/background.gif);
background-repeat: repeat;
}

body {
margin: 0;
font-family: verdana, arial, helvetica, sans-serif;
font-size: 62.5%;
color: #000000;
background-image: url(../images/background.gif);
background-repeat: repeat;
}

24 Mar 2008, 2:24 AM
#3
dsewell avatar

dsewell

New Zenner

Join Date:
Mar 2008
Posts:
3
Plugin Contributions:
0

Re: Background image won't display

Thanks, I'm starting to get it.

I took the whole URL(http://www.....) and replaced it with (../images/background.gif); It works now.

How does the CSS know the whole file path?

24 Mar 2008, 2:46 AM
#4
gjh42 avatar

gjh42

Black Belt

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

Re: Background image won't display

That's part of the inner workings of CSS. You and I only need to know that it does it.

The . is used in various file-handling programs to symbolize something like "the parent or root of where you are now".