Connecting Tech Pros Worldwide Forums | Help | Site Map

External CSS background image not showing up

Newbie
 
Join Date: Sep 2007
Posts: 1
#1: Sep 13 '07
Hello,

New here and having some difficulty getting a back ground image to appear in my html when called from an external CSS. I am working on OS 10.2.something with Dreamweaver 8.

I have gone through this forum and tried all the suggestions which seemed applicable. Nothing is working. What is weird is that, it worked about four days ago when the site I made went live. Now the client wanted a few changes, and, though the code is all still there and I have changed nothing, it's as if the CSS won't recognize the image it recognized before and nothing is transferring over to the page itself. This has happened across the board on each and every page. I am so frustrated, I could scream. Began a test site to see if my code was tweaked and I just couldn't see it. A different background image loaded on the test site without a single problem. Here's my CSS:

Expand|Select|Wrap|Line Numbers
  1. body {
  2. background-image: url(images/6P-CSS-BG.jpg) ; 
  3. background-color:#000000;
  4. background-repeat: no-repeat;
  5. font-size:10px;
  6. font-color: #000000;
  7. font-family:Verdana, Arial, Helvetica, sans-serif;
  8. }
Here's the linkref in html:

Expand|Select|Wrap|Line Numbers
  1. <link rel="stylesheet" type="text/css"
  2. href="../../6p.css"/>
I get no error codes, but nothing is happening. Is this a problem with the software or is there just something I can no longer see because I have worked on it for way too long?

Thanks,
Rachel

Expert
 
Join Date: May 2007
Posts: 213
#2: Sep 13 '07

re: External CSS background image not showing up


Other than the image, does the CSS work?
Death Slaught's Avatar
Site Addict
 
Join Date: Aug 2007
Location: Tennessee
Posts: 952
#3: Sep 13 '07

re: External CSS background image not showing up


Quote:

Originally Posted by tchatchke

Hello,

New here and having some difficulty getting a back ground image to appear in my html when called from an external CSS. I am working on OS 10.2.something with Dreamweaver 8.

I have gone through this forum and tried all the suggestions which seemed applicable. Nothing is working. What is weird is that, it worked about four days ago when the site I made went live. Now the client wanted a few changes, and, though the code is all still there and I have changed nothing, it's as if the CSS won't recognize the image it recognized before and nothing is transferring over to the page itself. This has happened across the board on each and every page. I am so frustrated, I could scream. Began a test site to see if my code was tweaked and I just couldn't see it. A different background image loaded on the test site without a single problem. Here's my CSS:

body {
background-image: url(images/6P-CSS-BG.jpg) ;
background-color:#000000;
background-repeat: no-repeat;
font-size:10px;
font-color: #000000;
font-family:Verdana, Arial, Helvetica, sans-serif;
}

Here's the linkref in html:

<link rel="stylesheet" type="text/css"
href="../../6p.css"/>

I get no error codes, but nothing is happening. Is this a problem with the software or is there just something I can no longer see because I have worked on it for way too long?

Thanks,
Rachel

For starters your: "url(images/6P-CSS-BG.jpg) ; " should be:

Expand|Select|Wrap|Line Numbers
  1. url("images/6p-CSS-BG.jpg");
also in your "link rel" ( this isnt really a problem it just bugs me ) you should have a space between your end " and your forward slash / like this:

Expand|Select|Wrap|Line Numbers
  1. <link rel="stylesheet" type="text/css"
  2. href="../../6p.css" />
Hope it helps, Death
Newbie
 
Join Date: Sep 2008
Posts: 1
#4: Sep 29 '08

re: External CSS background image not showing up


you have to make sure your image URL is relative, for example "../images/background-006.gif"
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,648
#5: Sep 30 '08

re: External CSS background image not showing up


Quote:

Originally Posted by buggs

you have to make sure your image URL is relative, for example "../images/background-006.gif"

I had no problems, when I used absolute paths...
Reply