View Full Version : how to set a background image with CSS

17 Dec 2005, 04:18 AM
hi hope someone can help, im trying to set a background image to my web page using CSS so that the page conforms to xhtml standards but it just wont work even though the code ive used is from several web tutorials that ive looked at. The background image is located in a subfolder called graphics.

Here is the code that im using:

background-image: url('graphics/index_bg.jpg')

I also tried replacing the single quotes with double ones but that didnt work either.

...and then i put the following code in the <td> tag that i want the background applied to:

<td class="indexbgimage"></td>

What am i doing wrong?



17 Dec 2005, 02:05 PM
it should be

background-image: url(graphics/index_bg.jpg)