1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

how can I keep this on one line?

Discussion in 'CSS' started by Lpspider, Sep 10, 2005.

  1. #1
    How do I keep this menu on one line, even when I minimize the window?

    <style type="text/css">
    
    
    .menu a
    {
    float:left;
    width:8em;
    text-decoration:none;
    color:white;
    background-color:green;
    padding:0.2em 0.6em;
    border-right:1px green;
    }
    
    .menu a:hover {background-color:#bfd5bf}
    li {display:inline}
    
    
    
    
    
    .menu
    {
    position: absolute;
    top:125px;
    left:100px;
    }
    
    
    </style>
    
    
    
    
    
    
    
    
    
    
    <ul>
    <h2 class="menu">
    <li><a href="#">Home</a></li>
    <li><a href="#">Products</a></li>
    <li><a href="#">Testimonials</a></li>
    <li><a href="#">About</a></li>
    <li><a href="#">Contact Us</a></li>
    <li><a href="#">FAQ</a></li>
    </h2>
    </ul>
    
    Code (markup):
    thanks - sorry for the dumb question.
     
    Lpspider, Sep 10, 2005 IP
  2. mahmood

    mahmood Guest

    Messages:
    1,228
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    0
    #2
    for horizontal line:
    just specify width for 'container'

    
    <DIV ID='container'>
         <DIV STYLE='float:left;'>   <a href="#">Home</a>            </DIV>
         <DIV STYLE='float:left;'>   <a href="#">Products</a>        </DIV>
         <DIV STYLE='float:left;'>   <a href="#">Testimonials</a>   </DIV>
         <DIV STYLE='float:left;'>   <a href="#">About</a>            </DIV>
         <DIV STYLE='float:left;'>   <a href="#">Contact Us</a>     </DIV>
         <DIV STYLE='float:right;'>  <a href="#">FAQ</a>              </DIV>
    </DIV>
    
    PHP:
     
    mahmood, Sep 10, 2005 IP