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
    Regular Coder
    Join Date
    Nov 2009
    Location
    Florida United States
    Posts
    105
    Thanks
    6
    Thanked 2 Times in 2 Posts

    css background image not showing up

    I can't seem to get my background image to show in my header. It's simple enough I have done it 96279587981273452 times but for some reason it's not showing. Is there an obvious mistake I have? the site is at http://www.hardwearclothing.net/lotus

    Code:
    header {
    	float: left;
    	clear: left;
    	width: 200px;
    	height:175px;
    	background-image:url("images/header_bg.png");
    }
    Code:
    <header>
        <img src="images/logo.png" alt="Lotus Lounge Club in Pensacola" />
    </header
    >
    Last edited by calebandchels; 01-23-2012 at 06:28 PM.
    New Coder!!!!

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello calebandchels,
    This might work better for you -
    Code:
    header {
        background-image: url("../images/header_bg.png");
        clear: left;
        float: left;
        width: 200px;
    }
    See absolute and relative paths explained here.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    Regular Coder
    Join Date
    Nov 2009
    Location
    Florida United States
    Posts
    105
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by Excavator View Post
    Hello calebandchels,
    This might work better for you -
    Code:
    header {
        background-image: url("../images/header_bg.png");
        clear: left;
        float: left;
        width: 200px;
    }
    See absolute and relative paths explained here.
    I feel dumb...
    New Coder!!!!


  •  

    Posting Permissions

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