4 replies [Last post]
Stargazer
Offline
newbie
Last seen: 17 years 9 weeks ago
Timezone: GMT-5
Joined: 2004-09-25
Posts: 2
Points: 0

Hi I'm new to this forum, but not new to CSS.

I have a Frontpage webpage that I've linked to a CSS file. My background image code is:

body {
background-image: url("images/sky.jpg");
}

But the image doesn't display on the web page in FP (nor when I publish). Any changes I make to the font, color, etc. in the CSS works, but the image doesn't show.

I've tried variations on the quotes, as well as including the url location on the web (http://etc.)

Yes the sky.jpg is on the web and yes it's in my images folder on my hard drive web area as well.

I've done this before with FP, and actually I copied the coding from my other sheet just to make sure I wasn't accidentally inputting anything incorrectly.

Is there something I can check? Something you see I'm doing wrong?

Thanks!

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 5 weeks 2 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5343
Points: 2964

New to this forum with background-image question

Hi Stargazer,
Welcome to the CSS Forum.

Can you provide a link to an example, it would make debugging much easier.

Stargazer
Offline
newbie
Last seen: 17 years 9 weeks ago
Timezone: GMT-5
Joined: 2004-09-25
Posts: 2
Points: 0

New to this forum with background-image question

Here's the html code. The CSS is only like I posted above. (NOTE: Now that I'm looking at this, the body code in the html has my old file name; I fixed that though and it's still not working. Now; I removed the entire <body> line in the html coding. It fixed the problem. Also Frontpage was having problems turning off the checkbox in the Format/Background options; it wouldn't go away. Looks like Frontpage wouldn't remove the errant coding from the html) Thanks all.

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>mywebsite</title>
<link rel="stylesheet" type="text/css" href="myindex.css">
</head>

<body background="images/sky_1280.jpg" style="background-image: url('')">

<p align="center">
<font face="Verdana" size="5" color="#FF6633">mywebsite.com</font></p>
<p align="center">
&nbsp;</p>
<p align="center">
<a href="wordpress"><font face="Verdana" color="#FF6633">Journal</font></a></p>
<p align="center"><font face="Verdana">Links</font></p>
<p align="center"><font face="Verdana">-Favorites</font></p>
<p align="center"><font face="Verdana">-Friends</font></p>
<p align="center"><font face="Verdana">-Games</font></p>
<p align="center"><font face="Verdana">Photo Gallery</font></p>
<p align="center"><font face="Verdana">Portfolio</font></p>

</body>

</html>

seb
Offline
Enthusiast
Last seen: 14 years 44 weeks ago
Joined: 2003-09-20
Posts: 208
Points: 0

New to this forum with background-image question

The inline style in your body tag will be overriding the one you have set in your CSS file.

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 9 weeks 1 day ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9674
Points: 810

New to this forum with background-image question

And try not to use FrontPage because . . . well, it sucks.

Verschwindende wrote:
  • CSS doesn't make pies