Why won't this bg image display?

Discussion in 'Web Design' started by delita, Jan 2, 2009.

to remove all ads.
  1. delita

    delita New Member

    Messages:
    4
    Hi,

    I've made a site using Matthew James Taylor's Two Column Right Menu layout.
    http://matthewjamestaylor.com/blog/perfect-2-column-right-menu.htm

    Of course I've modified it and I made this site:
    http://carlosthetaxman.com/

    I have a background image that I want the body to use. Here's the code:

    body {
    background-image: url(images/bg.png);
    background-repeat: repeat-x;
    }

    You can see that the image is indeed there.
    http://carlosthetaxman.com/images/bg.png

    So for whatever reason, this isn't working. Even when I mouse over that part of the CSS in Firebug the image doesn't appear.

    I made a very simple page and used the same background code and it works fine there. I also tried just starting with Matthew James Taylor's layout again applied the background code and it didn't work. Maybe there's something odd about the CSS he used that's causing this to not work? I have no idea. I really quite baffled. Any help would greatly appreciated.

    Thanks
     
  2. horrorshow75

    horrorshow75 New Member

    Messages:
    160
    Put a / in front of images

    Code:
    body {
    background-image: url(/images/bg.png);
    background-repeat: repeat-x;
    }
    
     
  3. delita

    delita New Member

    Messages:
    4
    i tried that and it didn't help. any other ideas?
     
  4. adx

    adx New Member

    Messages:
    220
    Keep the slash, but remove the bit that says: background-position: top left;
    It shouldn't do any harm but it isn't necessary. I can't really see any reason why it isn't working! This must be driving you nuts!
     
  5. delita

    delita New Member

    Messages:
    4
    Indeed it is!
     
  6. delita

    delita New Member

    Messages:
    4
    lol, i cant believe i didnt see this sooner
    my path to the image file should have been ../images/bg.png as my css file was in a css dir so it needed to go up a dir and then go into images
    sigh...
    at least i got it. thanks for looking at it for me
     

Share This Page