Skip to main content

How to create a Navigational menu using a list | CSS tutorial


Transforming a list into a Navigational menu is one of the most popular technique used these days, by just using CSS we can easily transform a list in to visually attractive navigation menu.

Here is an Example:

HTML Code:

<body>
<div id="nav">
  <ul>
    <li><a href="you_url">Rock</a></li>
    <li><a href="you_url">Jazz</a></li>
    <li><a href="you_url">Pop</a></li>
    <li><a href="you_url">Hip-Hop</a></li>
    <li><a href="you_url">Metal</a></li>
  </ul>
</div>
</body>
 

CSS Code:

<style>
ul {
                border-left:#333 15px solid;
                padding:0;
}
ul li {
                list-style-image:url(tri.png);
                background:rgb(192,202,229);
                width:150px;
                height:35px;
                border-bottom:2px solid #0CF;
                padding:0;
                margin-left:25px;
                text-align:center;
}
ul li a {
                text-decoration:none;
                color:#666;
                font-family:Arial, Helvetica, sans-serif;
                font-size:14px;
                font-weight:bold;
}
ul li:hover {
                background:#00FFFF;
}
</style>
Navigation menu using CSS


Comments

Post a Comment

Thanks for Visiting for any questions or suggestions please comment below
Cheers,

Popular posts from this blog

Adding a button in HTML | styling a button

To add a button in a HTML page use <input> tags and specify the type as button like so
<input type=”button” value=”submit” action=”submit.php”> this code will be rendered in browser like in Figure 1.1
Further more if you wish to style this button we can apply a set of CSS rules to make the buttons look pretty here are a few examples: Download code for these buttons here



Advanced Jquery easing | Demo and Download

Swing and Jquery easing are included in the Jquery core library but there are many other easing methods which are included in the Jquery easing plugin, available in the Jquery plugin repository. Here are the other easing methods: easeInCirc easeInOutExpo easeOutBack easeOutElastic easeOutBounce easeInOutElastic



to use this easing methods we need to pass its name to the animate function lets see an example which covers most of the above said easing methods.
Download DEMO

<! DOCTYPE HTML> </head> <script type="text/javascript" src="Scripts/jquery-1.7.2.min.js"></script> <script type="text/javascript" src="Scripts/easing.js"></script> <style> p{ height:150px; overflow:hidden;} #div1,#div2,#div3,#div4{ position:absolute; border:1px solid #999; border-radius:5px; width:350px; padding:6px;} #div1,#div3{ margin-left:5%; background-color:#00CCFF; } #div2,#div4{ margin-left:50%; background-color:#FC0;} #div3,#div4{ margin-top:…