Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    82
    Thanks
    15
    Thanked 3 Times in 3 Posts

    css background image

    hey guys. simple question

    i have a header "strip" image that doesn't show up. without all the nesting in DIVs, the image renders correctly, however it doesn't with.

    home.html

    <html>
    <head>
    <link rel="stylesheet" type="text/css" href="style/header.css"/>
    </head>
    <body>
    <!-- Header -->
    <div id="header">
    <!-- Strip Section -->
    <div id="strip_section">
    <div id="logo">
    </div>
    </div>
    </div>
    </body>
    </html>

    --------
    header.css

    #logo
    {
    width: 403px;
    height: 138px;
    background-image: url('images/header_logo.png');
    }

    the images and files are nested correctly, so I don't understand what's the problem.

    POSSIBLY is my css wrong?

  • #2
    New Coder
    Join Date
    Mar 2011
    Posts
    62
    Thanks
    3
    Thanked 2 Times in 2 Posts
    Try putting " instead of ' around the url - use double quotes instead of single quotes?

  • #3
    Registered User
    Join Date
    Feb 2011
    Posts
    82
    Thanks
    15
    Thanked 3 Times in 3 Posts
    eh? i didnt think it mattered

    EDIT: yeah stupid me I nested it wrong. when you have a css stylesheet, the image has to be url('style/images/blank.png').
    Last edited by Aurora.Light; 04-01-2011 at 01:45 AM.


  •  

    Posting Permissions

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