Results 1 to 2 of 2

Thread: how to set a background image with CSS

  1. #1
    Join Date
    Nov 2005
    Location
    Northwest - England
    Posts
    28

    how to set a background image with CSS

    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:

    .indexbgimage{
    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?

    Regards

    Dave

  2. #2
    Join Date
    Dec 2005
    Location
    Plymouth
    Posts
    357
    it should be

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •