Stupid css problem!

T

Tony Benham

I've starting learning a little about css. I'm trying to put a background on
a page I've tried using a css file, calling via
<link rel="stylesheet" href="sitewide.css" type="text/css">
sitewide.css which contains a line
body {background-image: url(zebra1.jpg); background: white; color : black;}
or via the html file itself.
<HEAD> section
<STYLE type="text/css">
<!-- body {background-image: url(zebra1.jpg); background: white; color :
black;} -->
</STYLE>
<HEAD>

However I'm not getting the image for the background. Anyone have ideas what
I'm missing ? The image is in the same directory as the html and css file.
I've tried IE6 as a browser and a coffeecup editor but both behave the same.

Cheers
Tony
 
J

Jacqui or (maybe) Pete

I've starting learning a little about css. I'm trying to put a background on
a page I've tried using a css file, calling via ....
body {background-image: url(zebra1.jpg); background: white; color : black;} ....
However I'm not getting the image for the background. Anyone have ideas what
....
'background' is a short cut that sets all of the various options at
once. Anything you leave out is set to the default - so your
'background' is overriding your background-image.

Either use 'background-image: url(zebra1.jpg); background-color:
white;' or (better) 'background: white url(zebra1.jpg);'

Reference:
http://www.w3.org/TR/REC-CSS2/colors.html#propdef-background
 
K

ketil V.

Tony said:
I've starting learning a little about css. I'm trying to put a background
on
a page I've tried using a css file, calling via
<link rel="stylesheet" href="sitewide.css" type="text/css">
sitewide.css which contains a line
body {background-image: url(zebra1.jpg); background: white; color :
black;} or via the html file itself.
<HEAD> section
<STYLE type="text/css">
<!-- body {background-image: url(zebra1.jpg); background: white; color :
black;} -->
</STYLE>
<HEAD>

However I'm not getting the image for the background. Anyone have ideas
what I'm missing ? The image is in the same directory as the html and css
file. I've tried IE6 as a browser and a coffeecup editor but both behave
the same.

Cheers
Tony

I would reffere to the url of the directory as well, and checked for both
spelling and capital letters.

I am doing the same as you in the stylesheet for all error pages on my site,
take a look at http://ketil.homeunix.net/stil.css for an example

:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top