Helpful Information
 
 
Category: CSS Help
css background image

Well, I'm sure this is really simple, but I've been playing with it all night and I just can't get the darned thing to display.

I'm just trying to set up the background image by redefining the body tag using CSS. It won't display an image at all. I've tried hand coding it and using an editor, and I've tried code nabbed off of WebMonkey, and none of it will work. Any other body attributes work fine though--color, etc.

Oh yeah, and my browser will display it just fine because sites I look at use this and they display great. (Using IE 5.5 for this.)

Any suggestions?

Thanks.

Jamie

Here's some code that didn't work:

<html>
<head>
<link rel='stylesheet' type='text/css' href='https://forums.devshed.com/archive/index.php/styles_orange0.css'>
</head>

<body bgcolor="#ffffff" text="#000000" id=all>
<p class="content">text goes here</p>
</body>
</html>


styles_orange0.css:

BODY { background-image: url(/images/orange0/bg.jpg);
background-color: #333333;}
.content { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; color: #FFFFFF;}

I'm guessing it can't find the background image file.

Try changing the address to:

url(./images/orange0/bg.jpg);

that is put a ./ at the front.

John :)

Instead of
BODY { background-image: url(/images/orange0/bg.jpg);

I would write
BODY { background-image: url("images/orange0/bg.jpg");

Steffen










privacy (GDPR)