Need some help with HTML/CSS

Discussion in 'HTML & Website Design' started by designcentral, Sep 26, 2009.

  1. #1
    Hi there,

    I am doing a little site for a friend of mine and have run into some difficulty...

    What I want is for the header to stretch across the full width of the page.

    Here is my code:

    <div id="wrap"><div id="header">
    <div id="logo">
    <img src="images/logo.png" alt="Bluetiger Design">
    </div>
    <div id="nav">
    <ul>
    <li><a href="index.html">Home</a></li>
    <li><a href="web_design.html">Web Design</a></li>
    <li><a href="hosting.html">Hosting</a></li>
    <li><a href="graphic_design.html">Graphic Designs</a></li>
    <li><a href="domains.html">Domains</a></li>
    <li><a href="contact.html">Contact</a></li>
    </ul>
    </div>
    </div></div>
    HTML:
    and my css...
    #header {
    background-color:#1b1b22;
    height:100px;
    width:970px;
    text-align:left;
    float: left;
    }
    
    #logo {
    background-color:#1b1b22;
    height:100px;
    width:400px;
    float: left;
    }
    
    #nav {
    background-color:#1b1b22;
    float:left;
    position:fixed;
    top:30px;
    right:375px;
    }
    
    #nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    }
    
    #nav li
    {
    float: left;
    margin: 12px;
    font-family: Segoe UI, sans-serif;
    } 
    
    #nav a, #nav a:visited {
    
    	
    	font-size: 15px;
    
    	font-weight: bold;
    
    	color: #79797d;
    
    	text-decoration: none;
    
    	}
    
    	
    
    #nav a:hover {
    
    	text-decoration: none;
    	
    	color: #d8d8d8;
    
    	}
    HTML:
    So I just want the background that contains the logo and the nav to stretch across the width of the entire page.

    Thanks for your help in advance!
     
    designcentral, Sep 26, 2009 IP
  2. myst_dg

    myst_dg Active Member

    Messages:
    224
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #2
    Using float and position at the same time? Weird...
     
    myst_dg, Sep 26, 2009 IP
  3. designcentral

    designcentral Guest

    Messages:
    106
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yea the float isn't ment to be there...
     
    designcentral, Sep 26, 2009 IP
  4. myst_dg

    myst_dg Active Member

    Messages:
    224
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #4
    Hey buddy, don't tell me that you're making a living on web design, what an incredible world...
     
    myst_dg, Sep 27, 2009 IP
  5. designcentral

    designcentral Guest

    Messages:
    106
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hmmm... it's not a good look when some friends use your account!!!!! - I make a living on web development, but not my friend who used my computer to post... *sigh*
     
    designcentral, Sep 27, 2009 IP