css background image

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

I am creating an external css page in fp 2003. What I would like to do is
specify a certain image in my image directory that would be the default
background image for all web pages in my site. Do you manual create this in
my external css page that I have created? If so what is the code/script to
create this?

Thanks,
 
body { background-image:url(images/foo.jpg); }

You may also want to specify a background-repeat style or even a
background-position style.
 
Hi,
body{
background-image: url(Images/PageBackground.jpg);
}

Make the url relative to the stylesheet.

Jon
 
Okay I haven't used css much which you can probably figure out. I am not
getting the image to display as the page background. my css page will
display the color, font, text size that I have chosen but I must be
configuring the image area incorrectly. The url area - do I put in place of
the url - the url of the web site? I understand the images/name of file but
the url I'm not clear about

body { background-image:url(images/foo.jpg); }
 
It means that the URL path to the image should be relative to where the page
with the stylesheet is. For example, if the page is in the root and the
image is in the images folder then it would be images/PageBackgound.jpg

If the page was deeper in the web then the path might be ../images or even
.../../images etc. If the page was in the same folder as the image then you
wouldn't need images/ you'd just put PageBackground.jpg
 
Hi,
If you had folders like this
/scripts
stylesheet.css
/images
YourBackground.jpg

then the css would be
body{
background-image: url(../Images/PageBackground.jpg);
}
 
Well I can now get it to work but in netscape or firefox the background will
not display but the font size and colors do
 
Back
Top