Dynamic tab without javascript : tab : CSS Controls HTML CSS TUTORIALS


HTML CSS TUTORIALS » CSS Controls » tab »

 

Dynamic tab without javascript


 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
     <head>
      <meta http-equiv="content-type" content="text/xhtml; charset=windows-1252" />
      <meta http-equiv="content-language" content="en-us" />
        <style type="text/css">
            div {
                background: lightgrey;
                padding: 0.7em;
                clear: left;
            }
            ul#navigation {
                list-style: none;
                background: gray;
                margin: 0.1em;
                padding: 0;
            }
            ul#navigation li {
                float: left;
                margin: 0.4em;
            }
            ul#navigation li a {
                padding: 0.3em;
            }
            ul#navigation li a:link {
                background: gray;
            }
            ul#navigation li a:active {
                background: orange;
            }
            ul#navigation li a:visited {
                background: black;
            }
            ul#navigation li a:hover, li a:focus {
                background: white;
                color: black;
            }
            ul#navigation div {
                position: absolute;
                right: 0;
                top: 0;
                background: gray;
                display: none; 
            }
            ul#navigation li:hover > div {
                display: block;
            }
            
            ul#top li a {
                color: #eee;   
            }

        </style>
    </head>
    <body>
        <ul id='navigation'>
            <li>
                <a href=''>home</a>
                <div>home</div>
            </li>
            <li>
                <a href=''>contact us</a>
                <div>contact us.</div>
            </li>
            <li>
                <a href=''>products</a>
                <div>product</div>
            </li>
            <li>
                <a href=''>services</a>
                <div>service</div>
            </li>
            <li>
                <a href=''>faq</a>
                <div>faq</div>
            </li>
        </ul>
    </body>
</html>

 



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo CSS Controls
» tab