treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Coding in Navigation?

  • Hey, I'm new to the css thing. Anyway, I'm trying to practice on a simple layout I created. Here's what I have so far. I want the navigation to stretch automatically so that I can continue adding as much links I want.


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
    <html xmlns="http://www.w3.org/1999/xhtml"&gt;
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <link rel="stylesheet" type="text/css" href="style_b.css">
    </head>
    <body>
    <div id="container">
    <div id="header"></div>
    </div><!--end_header-->

    <div id="main">
    <div id="secondary">
    <ul>
    <li><a href="#">home</a></li>
    <li><a href="#">home</a></li>
    <li><a href="#">home</a></li>
    <li><a href="#">home</a></li>
    <li><a href="#">home</a></li>
    <li><a href="#">home</a></li>
    <li><a href="#">home</a></li>
    <li><a href="#">home</a></li>
    <li><a href="#">home</a></li>
    <li><a href="#">home</a></li>
    </ul>
    </div>
    </div>
    </body>
    </html>

    Style Sheet:
    body{
    margin:0px;
    padding:0px;
    }

    #header {
    margin:0 auto;
    height:173px;
    width:670px;
    background:url(images/bradpit_01.jpg) no-repeat;
    }

    #main {
    margin:0 auto;
    padding-bottom: 4em;
    background:url(images/bradpit_02.jpg) no-repeat;
    }


    Problem:
    http://i43.tinypic.com/24o3ibk.png
  • Stretch - Vertically or Horizontally? -..-***