Grow your CSS skills. Land your dream job.

Image bg not showing in my ul id tag

  • # January 29, 2010 at 8:03 am

    This is driving me insane and I feel so dense, even went to sleep on it and still having the same problem.

    Why is my page not showing ul bg pls?

    I was following chrises first psd to html and already having problem.

    Code:
    < !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



    vm.css

    Code:
    @charset “utf-8″;

    * {
    margin: 0;
    padding: 0;
    }

    body {
    font-family: Verdana, Geneva, sans-serif;
    background:#ffff00 url(‘../images/vminterfacebg.png’) repeat-x;

    }

    ul# nav {
    height: 118px; width: 940px;
    margin: 0 auto;
    background:url(‘../images/vminterface_header.jpg’) no-repeat;
    }

    Thanks.

    # January 29, 2010 at 9:16 am

    If your images are not showing in any browser, then the path to them is incorrect. Remove the ‘ ‘ from the url(‘../images/vminterfacebg.png’), and make sure that everything is written in the same case and that there are no typos. The css file is looking outside it’s own folder for a folder called images

    # January 29, 2010 at 10:40 am

    Your code:

    Code:
    ul# nav {
    height: 118px; width: 940px;
    margin: 0 auto;
    background:url(‘../images/vminterface_header.jpg’) no-repeat;
    }

    Try making it "ul#nav".

    # January 29, 2010 at 10:57 am

    Thanks Jamy that did it, can’t believe the space made al the difference. Cheers

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".