Horizontal menu with list : Navigation Bar « CSS Controls « HTML / CSS






Horizontal menu with list

  

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <title></title>
        <style type='text/css' media='all'>
            li a {
                padding: 2px;
                color: black;
                font-size: 15pt;
                text-decoration: none;
            }
            li a:link {
                background-color: white;
                color: black;
            }
            li a:visited {
                background-color: black;
                color: white;
            }
            li a:active {
                background-color: lightgray;
                color: black;
            }
            li a:hover, li a:focus {
                background-color: gray;
                color: white;
            }
            ul {
                list-style: none;
            }
            li {
                border: 1px solid black;
                padding: 5px;
                margin: 2px;
                float: left;
            }
            
        </style>
    </head>
    <body>
        <ul>
            <li><a href=''>DDDD</a></li>
            <li><a href=''>CCCC</a></li>
            <li><a href=''>BBBB</a></li>
            <li><a href=''>AAAA</a></li>
        </ul>

    </body>
</html>

   
  








Related examples in the same category

1.Left navigation bar
2.One column with top navigation bar
3.Right navigation bar
4.Left bar menu
5.Horizontal menu
6.Expandable left bar
7.CSS tab based navigational bar
8.Nested List style
9.Styled tab navigation
10.Negative Margins example
11.Horizontal navigation bar with anchor and list
12.Using image only as the top navigation bar
13.Vertical Navigation
14.Horizontal Navigation
15.Highlight top navigation link when mouse hover
16.Links navigation at the bottom
17.One level top navigation bar
18.Navigation bar with selected item
19.Horizontal Nav