How to create a horizontal select menu in HTML and CSS.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JM2000
    New Member
    • Mar 2014
    • 1

    How to create a horizontal select menu in HTML and CSS.

    Hello All. Is there any way that you can create a HTML select menu with options that is displayed inline like:

  • aswal
    New Member
    • Aug 2013
    • 38

    #2
    First create a list

    Code:
    <ul id="nav">
    <li>1</li>
    <li>2</li>
    </ul>
    
    
    Now apply css to it
    
    #nav
    {
    list-style:none;
    display:inline;
    }
    
    #nav li
    {
    float:left;
    border:1px solid black;
    }
    
    #nav li:hover
    {
    color:white;
    background-color:black;
    }
    Last edited by Rabbit; May 2 '14, 09:29 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.

    Comment

    Working...