CSS image float and nav

Discussion in 'HTML & Website Design' started by Arnold9000, Mar 14, 2007.

  1. #1
    I have a logo for the top left and a nav for the top right. I can't get the nav to float around the image. It shows up underneath. What am i missing? Here's the code.Thanks.

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>

    <style>

    body {
    background: #003399;
    margin: 15px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 10px;
    }

    # container {
    margin: 0 auto;

    }

    # logo {
    float: left;
    }

    ul {
    margin: 0;
    padding: 0;
    list-style: none;
    float: left;
    }

    ul li {
    float: left;
    }

    </style>
    </head>
    <body>
    <div id="container">
    <img id="logo" src="images/logo.gif"/>
    <ul>
    <li>technology</li>
    <li>applications</li>
    <li>solutions</li>
    <li>contact us</li>
    <li>company</li>
    <li>support</li>
    <li>employment</li>
    </ul>

    </div>
    </body>
    </html>
     
    Arnold9000, Mar 14, 2007 IP
  2. xluciusx

    xluciusx Peon

    Messages:
    470
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    the problem could be in your html code.
    is it a spliced layout(tables) or div
     
    xluciusx, Mar 14, 2007 IP
  3. Arnold9000

    Arnold9000 Peon

    Messages:
    241
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #3
    That's the entire code, There are no tables referenced. I noticed that I had a space between my # and the object name in my style sheet. Suddenly, everything worked after I got rid of that. I didn't know style sheets were so strict about empty spaces in their specs, but lo and behold, seems like that's the case. Anyway. Thanks for looking at my stuff. Bliss and happiness to you for being so kind !!!.
     
    Arnold9000, Mar 14, 2007 IP
  4. xluciusx

    xluciusx Peon

    Messages:
    470
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    no problem at all.
    i try to help wherever i can
     
    xluciusx, Mar 15, 2007 IP