Header AD

How to add Simple Drop down Menu Using CSS

Recently, one of my visitor friend asked me how to add drop down menu in blogger. So this tutorial specially dedicated to him. Friends here I am going to show you that the adding technique of drop down menu in blogger only using css. There is no need to add javascript and jquery for this tutorial. Actually using javascript and jquery make the site little bit slower than the using css. Therefore, there is no need to run after the javascript and jquery.

It is too easy to add this code into your blogger blogs. You also should not keep back up of your templates because actually this does not affect the template code of blog. So now lets go into our step by step process of drop down tutorial:-

This is not extra things for you but some of my visitors asked me for dropdown menus, so I put this simple codes for simple drop down menu.

Step 1: In the beginning just copy the following code.

<div id='absnavbar'>
<ul id='absnav'><li> <a href='#'>Company</a> </li>
<li> <a href='#'>Portfolio</a></li>      
<li> <a href='#'>About</a> </li>
<li> <a href='#'>Contact</a>
<ul> <li><a href='#'>sub_contact 1</a></li>
<li><a href='#'>sub_contact 2</a></li>
<li><a href='#'>sub_contact 3</a></li>
</ul>
</li>
</ul>  
</div> 

Step 2: Then Login into your Blogger and find the layout then click it and just search the HTML/JAVASCRIPT.
\
Step 3: Now just paste the above code into HTML/JAVASCRIPT box.

Step 4: After that save it.

Now you have to add the css code for formatting or giving the style for that HTML code.

Step 5: Just go to the layout and at the top of layout you can see the template designer link, just click it.

Step 6: Then click on advance and choose the add css link among these list. And then paste the given code in this box.

/*-----Drop Down Menu for Blogger by allblogsolution ----*/
#absnavbar {     background: #333333;     width: 960px;     color: #ffffff;         margin: 0px;         padding: 0px;         position: relative;         border-top:0px solid #323232;         height:38px;}
#absnav {     margin: 0px;     padding: 0px; #absnav ul {     float: left;     list-style: none;     margin: 0px;     padding: 0px; #absnav li {     list-style: none;     margin: 0px;     padding: 0px;         border-left:1px solid #333;         border-right:1px solid #333;         height:38px; #absnav li a, #absnav li a:link, #absnav li a:visited {     color: #eeeeee;     display: block;    font:normal 14px Helvetica, sans-serif;    margin: 0;     padding: 10px 13px 11px 13px;         text-decoration: none;         #absnav li a:hover, #absnav li a:active {     background: #ff0100;     color: #ffffff;     display: block;     text-decoration: none;         margin: 0px;     padding: 10px 13px 11px 13px;                     }#absnav li {     float: left;     padding: 0px; #absnav li ul {     z-index: 9999;     position: absolute;     left: -998em;     height: auto;     width: 160px;     margin: 0px;     padding: 0px; #absnav li ul a {     width: 142px; #absnav li ul ul {     margin: -25px 0 0 161px; #absnav li:hover ul ul, #absnav li:hover ul ul ul, #absnav li.sfhover ul ul, #absnav li.sfhover ul ul ul {     left: -998em; #absnav li:hover ul, #absnav li li:hover ul, #absnav li li li:hover ul, #absnav li.sfhover ul, #absnav li li.sfhover ul, #absnav li li li.sfhover ul {     left: auto; #absnav li:hover, #absnav li.sfhover {     position: static; }#absnav li li a, #absnav li li a:link, #absnav li li a:visited {     background: #ff0100;     width: 120px;     color: #ffffff;     display: block;     font:normal 14px Helvetica, sans-serif;     margin: 0;     padding: 10px 13px 11px 13px;         text-decoration: none; z-index:9999; border-bottom:1px dotted #444444;    #absnav li li a:hover, #absnavli li a:active {     background: #151414;     color: #ffffff;     display: block;     margin: 0px;     padding: 10px 13px 11px 13px;         text-decoration: none; }
Step 7: At last click on apply now button.

Now we are successfully done this tutorial. Thanks for visiting us.
How to add Simple Drop down Menu Using CSS How to add Simple Drop down Menu Using CSS Reviewed by Rakeysh Aryal on November 23, 2015 Rating: 5

No comments

Any comment will be appreciated, comment will be published according to our comment policy

Post AD