Click to See Complete Forum and Search --> : Background Image


mAthlete
06-07-2004, 01:59 PM
I feel pretty silly asking this question, I consider myself pretty savvy with HTML, but I can't seem to find a way to set an image as the background. I know how to set it as a color, and I have tried <body background="imagename.jpg"> among other tags, but it just shows a white background. Do I have to use stylesheets? if so, what does that entail, downloading a file or putting it on a server? I have never consciously used style sheets. Thank you for your advice.

Sam
06-07-2004, 02:01 PM
yes, use a stylesheet.

html,body{
background:url(imagename.jpg)
}

you don't neccesarily have to use an external file, but it is better for caching sake.