Nested List style : Navigation Bar « CSS Controls « HTML / CSS






Nested List style

  

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title></title>
    <style type="text/css">
    a:link {
    color: #777;
    text-decoration: none;
    }

    a:link:visited {
      color: #333;
    }

  a:link:hover  {
    color: #777;
    background-color: #ccc;
  }

  a:link:active {
    color: #ccc;
    background-color: #ccc;
  }


    #myNav {
      background-color: #eee;
      padding: 4px;
    }

    #myNav h3 {
      display: none;
    }

    #myNav ul {
      display: inline;
      padding-left: 0;
      margin-left: 0;
    }

    #myNav ul li {
      display: inline;
    }

    #myNav ul li a:link {
      padding: 4px;
    }

    #myNav ul ul li:before {
      content: ">";
    }
    </style>
  </head>
  <body>

<div id="myNav">
<ul>
  <li><a href="http://www.java2s.com">Home</a>
    <ul>
      <li><a href="http://www.java2s.com">Home</a>
        <ul>
          <li><a href="http://www.java2s.com">Home</a>
            <ul>
              <li><a href="http://www.java2s.com">Home</a></li>
            </ul>
          </li>
        </ul>
      </li>
    </ul>
  </li>
</ul>
</div>
  </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.Styled tab navigation
9.Negative Margins example
10.Horizontal navigation bar with anchor and list
11.Horizontal menu with 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