A simple Drop Down Menu For Blogger
106 COMMENTSDrop Down Menus are great for adding multiple links in your blog and yet they require very little space space. In addition it makes the site more user friendly and gives it a more professional look. I am going to show you how to add a customizable drop down menu to your blogger blog.
Drop Down Menu Preview:
Follow these steps to add a drop down menu to your Blog:
1. Go to Design->Edit Html
2. Download Full Template (This is to backup your template, so that you don’t lose any data).
3. Check the Expand Widget Templates
4. Now search for the following code:
</head>
5. Just place the following code before the code above.
<style>
#sddm
{ margin: 0;
padding: 0;
z-index: 30}
#sddm li
{ margin: 0;
padding: 0;
list-style: none;
float: left;
/*Font of menu top*/
font: bold 11px arial}
#sddm li a
{ display: block;
margin: 0 1px 0 0;
padding: 4px 10px;
/*width of each menu top*/
width: 60px;
/*background color of main menu*/
background: #5970B2;
/*text color of main menu*/
color: #FFFFFF;
text-align: center;
text-decoration: none}
#sddm li a:hover
{
/*background color of main menu on hover*/
background: #49A3FF}
#sddm div
{ position: absolute;
visibility: hidden;
margin: 0;
padding: 0;
/*background color of drop down menu */
background: #FFFFFF;
/*border of the drop down menu*/
border: 1px solid #5970B2}
#sddm div a
{ position: relative;
display: block;
margin: 0;
padding: 5px 10px;
width: auto;
white-space: nowrap;
text-align: left;
text-decoration: none;
/*background color of each menu element*/
background: #FFFFFF;
/*text color of each menu element*/
color: #2875DE;
/*font of each menu element*/
font: 11px arial}
#sddm div a:hover
{
/*background of each element on hover*/
background: #49A3FF;
/*font color of each menu item on hover*/
color: #FFFFFF}
</style>
<script type='text/javascript'>
var timeout = 500;
var closetimer = 500;
var ddmenuitem = 0;
// open hidden layer
function mopen(id)
{
// cancel close timer
mcancelclosetime();
// close old layer
if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
// get new layer and show it
ddmenuitem = document.getElementById(id);
ddmenuitem.style.visibility = 'visible';
}
// close showed layer
function mclose()
{
if(ddmenuitem) ddmenuitem.style.visibility = 'hidden';
}
// go close timer
function mclosetime()
{
closetimer = window.setTimeout(mclose, timeout);
}
// cancel close timer
function mcancelclosetime()
{
if(closetimer)
{
window.clearTimeout(closetimer);
closetimer = null;
}
}
// close layer when click-out
document.onclick = mclose;
</script>
6. Customize the drop down menu(optional):
You can customize the menu according to your blog. This is optional and use it only if you want a different look than the one already available.
The menu consists of three sections as shown in the figure:
1. Main Menu
2. Drop Down Menu
3. Element of Drop Down Menu
In the code you will find some comments. Below the comments you have some editable code.
Here is the explanation of some of the attributes used in the code:
Background: #XXXXXX
This attribute decides the background of the part and XXXXXX is the hex code of the color. You can change the background of each of the three parts.
Color:#XXXXXX
The color attribute decides the color of the text and XXXXXX is the color hex code.
You can get color hex codes from these online color choosers
ColorPicker
width: 123 px
The width determines the width of each element. You can increase or decrease the width according to your choice.
7. Adding the Menu:
a.Go to Design>Page Elements
b.Then click on Add Gadget
c. Then select HTML/JAVASCRIPT
d.Then Add the Following code
<ul id="sddm">
<li><a href="#"
onmouseover="mopen('m1')"
onmouseout="mclosetime()">Home</a>
<div id="m1"
onmouseover="mcancelclosetime()"
onmouseout="mclosetime()">
<a href="#">HTML Drop Down</a>
<a href="#">DHTML Menu</a>
<a href="#">JavaScript DropDown</a>
<a href="#">Cascading Menu</a>
<a href="#">CSS Horizontal Menu</a>
</div>
</li>
<li><a href="#"
onmouseover="mopen('m2')"
onmouseout="mclosetime()">Download</a>
<div id="m2"
onmouseover="mcancelclosetime()"
onmouseout="mclosetime()">
<a href="#">ASP Dropdown</a>
<a href="#">Pulldown menu</a>
<a href="#">AJAX Drop Submenu</a>
<a href="#">DIV Cascading Menu</a>
</div>
</li>
<li><a href="#">Order</a></li>
<li><a href="#">Help</a></li>
<li><a href="#">Contact</a></li>
</ul>
<div style="clear:both"></div>
Note: Replace # by the link of the item and if you want to add the menu, say the third element.
Replace <a href=”#”>Order</a> by the following code:
<a href="#"
onmouseover="mopen('m3')"
onmouseout="mclosetime()">Home</a>
<div id="m3"
onmouseover="mcancelclosetime()"
onmouseout="mclosetime()">
<a href="#">HTML Drop Down</a>
<a href="#">DHTML Menu</a>
<a href="#">JavaScript DropDown</a>
<a href="#">Cascading Menu</a>
<a href="#">CSS Horizontal Menu</a>
</div>
This is for the third menu, for the fourth replace each m3 by m4
f. Save the Gadget and the work is over. The Drop Down menu is live!
Credits: Javascript Array.
Do you have any questions? Tell me!
| This entry was posted by Gautam on June 6, 2009 at 5:19 pm, and is filed under blogger. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |












about 11 months ago
Hello Gautam.
I really need your help with this.I installed menu but i dont know how to edit.please answer..my blogg : http://madridistaplanet.blogspot.com/
my
El Grande´s last [type] ..Spisak Igraca za Mec Real Madrid – Levante
Reply
about 11 months ago
The menu is vertical instead of horizontal…what did I do wrong? Thank you! Here is is on my Testing blog:
http://tjscouponingcenter.blogspot.com/
TJ´s last [type] ..Introducing the Blogger Bug
Reply
about 9 months ago
I have the whole menu installed as you said, but in vain! There is no drop down menu displayed!
I have only edited some CSS! Thats it!
My Blog http://kelvincastelino.blogspot.com/
Kelvin Castelino´s last [type] ..CSI- NY Crime Scene Investigation- New York
Reply
October 10, 2011 - 3:49 am
If anybody want a dropdown menu with css and html only contact me my id is
‘rathee.9729945654@gmail.com’
Reply
October 10, 2011 - 11:17 am
Thank you so much! I figured it out before u replied to me!
Reply
about 9 months ago
Hi
I am completely new to any sort of computer programming. I basically need some tab on my blog to describe my Privacy Policy so I am in compliance with AdSense. I don’t want to sell anything, etc. I’d just like a tab that says “Privacy Policy” that folks can click on and read the policy. I put your menu up but it doesn’t work for me. Please help!
Mary Ann´s last [type] ..Put Some Color into Your Foundation Plantings
Reply
about 8 months ago
hi there, firsty this is a great code. i’ve been searching for a top down menu code that i could easily customise for a few days now, and wsnt having much luck, til i found this one, it worked great first time, and then worked even better once i customised the look of it
the only issue is in the pop down menu, i cant click the links as they go behind the post section theres just no click me mouse courser on them then they pop back into the main menu… u can see this on my test site http:/spurgtest.blogspot.com can anyone help me with this issue…????
i blagged this quite well on my real blog http://spurgurgle.blogspot.com by adding another html widget with a div /div code in as a spacer, but this isnt quite right… i would rather the drop down menu goes over the post text…. this will do for now but once i add more pages (items in the sub menu…) i will need to spce down the post area even more with more html spacer widgets….. (messy code for the search engine bots) so i would rather not have to do this
Reply
about 8 months ago
Hi
I have the same problem as mentioned above;
the menu folds out under the top post.
I have no clue how to fix it, so would greatly appreciate some tips!
Menu looks great otherwise, thank you!!
Kristine
Reply
about 8 months ago
I am attempting to customize the size of the original nav bar for the drop down menu. When I change the padding
#sddm li
{ margin: 0;
padding: 5px 35px 5px 5px;
three dots become visible. Could you please assist me in how to remove these dots.
How do you change the size of the nav bar to become smaller and how do I add the drop down menu to the other main menu headings
Reply
about 8 months ago
I am attempting to customize the size of the original nav bar for the drop down menu. When I change the padding
#sddm li
{ margin: 0;
padding: 5px 5px 5px 5px;
three dots become visible. Could you please assist me in how to remove these dots.
I too am having the problem of the drop down menu going behind the content area.
Please help
custo-minz´s last [type] ..Designs Testimonials
Reply
January 15, 2012 - 6:56 am
I know it’s been some time since you commented on this but did you ever find out how to get the drop down menu in front of the content area?
Reply
about 8 months ago
it’s work!! thanks…..
Reply
about 8 months ago
Hi, thanks for the tips. I have trouble installing the application though. I already added the html code but nothing happens? Any suggestions?
Reply
about 8 months ago
duh! sorry guys, i wasn’t just following instructions! i finally got it working, all i have to do is to customize it. thanks a ton!
matagoan´s last [type] ..Literature & Truth
Reply
about 8 months ago
Hi,
I have a problem with drop down menu bar. how i bring front drop down menu bar on flash. you can check it at my blog-http://newenglishvid.blogspot.com
Thanks.
Reply
about 8 months ago
Hi,
Installed the menu
thanks!! However, I have the same problem as raised in some of above comments.
1. When I place mouse over the dropdown menu items, it is not getting selected and there is no “click me” icon
2. the dropdown menu is gone behind the posts.
my blog is ->http://passgate.blogspot.com
Kindly help!
Salini
Salini´s last [type] ..Operating systems
Reply
about 7 months ago
I used your drop down menu and it works great in FireFox, Chrome, etc., but it goes haywire in IE. The menu tabs are blank and expand down into the posts.
Can you or somebody look at my source code (http://bbcrecollections.blogspot.com/) and see what I can do to fix this?
Thank you so much in advance!
Doc
Doc´s last [type] ..New Blog Design & Name
Reply
about 7 months ago
awesome tutorial! I’m still kinda new to blogger and I don’t know how to add it to the real navigation bar… All I have now is a navigation widget at the right side of the blog. please tell me how to that!
Reply
about 7 months ago
I’m having trouble with the drop down menus. They keep appearing behind the blog posts and I don’t know how to fix it. I don’t see a reply from you to other people who have had the same problem. This is a wonderful code and it is easy to customize. I don’t want to have to get rid of it because of this so please can you give me a solution.
Thank you
Jana
Reply
about 7 months ago
Hi
Thanks for the tip and its woking fine
One problem i am facing is that ” in the dropdown i have lots of link to add. So if could tell me how to add scrollong bar in the dropdown menu”
It will be helpful adding more links under one main menu
Expecting a quick response from your end
With regards
Jothis
Reply
about 7 months ago
Hi, first of all I want to thank you for your great tutorial (:
Second, I do have a problem though.
When I want the menu to dropdown, it is BEHIND the other posts, so you can’t click or see them because it’s behind it.
Next to that, when I remove the ‘Pages’ from the page-elements, it won’t fold out anymore.
Reply
about 6 months ago
Hi, I want to thank you too for your great tutorial
I do have the same problem mentioned in an earlier message.
When I want the menu to dropdown, it is BEHIND the other posts, so I can’t click or see them because it’s behind it.
my blog is
http://carbloggergr.blogspot.com
in help is appreciated
Dimitrios Sarafidis´s last [type] ..Τιμές επιδόσεων αυτοκινήτων κατασκευαστών – Μύθοι και αλήθειες (Μέρος 6ο)
Reply
about 6 months ago
Same problem, cannot get the drop down menu to appear in front of posts and other objects. Need help!!!!
Reply
about 5 months ago
Hey Gautam,
The link looks awesome on my website. However, I am having the same problems like those in other recent messages. My drop down menu is hidden behind my post or page. I can see 1 1/2 elements on one of the column, but that is only before I change the width to 183px. So I know it is working…I was wondering what you told other bloggers on how to fix this problem.
Thanks for the help and making this available for us beginners.
Malinda
Reply
about 5 months ago
This is the most helpful info i found today about putting a drop-down menu.
Thanks.
Reply
about 5 months ago
I have the same problem, i cant click on submenu because it’s hidden behind blog layer. I can see it but i cant click it.
Please help us.
Reply
about 5 months ago
cannot get drop down menu to appear!!! did i did any thing wrong??? Help Me!!! reply asap!
thank you!
Reply
about 4 months ago
Thanks a lot. I have used it in my blogspot (http://mukut-blogopedia.blogspot.com/) but having some problem. If there are 4/5 sub menu of a main menu, and its length cross the blog text overlapping submenu showed behind the text which links doesn’t works.
Temporarily, I add some HTML/JAVASCRIPT with simply “.” to make space below the menu gadget. Please show me a solution.
Reply
about 3 months ago
Thanks alot for this useful tip. i Have put it on my website… it looks great.
Reply
October 25, 2011 - 3:41 pm
You are welcome. I’m very happy if it helped you.
Reply
about 2 months ago
hi, can u help me create a blog , for my assignment>
Reply
about 1 month ago
Thank you for code, it has been very helpful. I just need to fix my drop down menu, it is hidden behind my post page. Can anyone give me instructions on how to do this. Thank you.
Reply
January 15, 2012 - 7:44 am
I saw that you mentioned that you had the drop down menu problem about 3 weeks ago and visited your site and saw that you had fixed it. May I ask how you did so? Here is my site gdogd7.blogspot.com
Reply
about 3 weeks ago
Hi there! I have been working on this for hours now. I am needing some tips from you. I have copied the code in HTML and have installed the menu to my blog. When I go into customize the drop down menu, I insert the links and the name etc but when I go to my blog to check the link, nothing happens…I am not sure what is going on. I had my first menu set up and then when checking after I completed all four menus the links stopped….weird. I erase and started over and still cannot get my links to work. any suggestions????
Reply
about 1 week ago
WONDERFUL MENU..I WAS LOOKING 4 IT
Reply
about 6 days ago
Hiya,
Such a fab tutorial – thanks a million for posting it!
I’d been playing around with code but couldn’t get it right until I came across your site. You’ve saved me a lot of work. 
I’m just hoping that you could point me in the right direction one more time. Menu looks great in Firefox (9.0.1) but in IE (8) it appears fine for a second and then all the boxes move to the side of the page and appear blank. Any advice on how to fix this? I gatehr that Doc had a smiliar problem several months ago. Any help would be fantastic.
Thanks
Reply