Create a Drop Down Menu In Blogger

Update: We have published almost 9 more menus like this one. To get them all just use the search box and type drop down menu. If you wish to add the same menu to Blogger Template Designer templates then read this post -> Custom Drop Down menu

image
Why do you run after scripts such as jquery while you can use simple CSS and HTML to create beautiful drop down menus for your blog. I already shared a list of 30 Navigation menus and now you need to learn how to create a drop down menu in a navigation. I am sharing a simple code here that can be fully customize to make your preferred changes. So lets get to work!


Live Demo


How To Create a Drop Down Menu?

A drop down menu is needed when you have too much content on your blog or you love keeping things organized. To add a drop down menu to your blogger blogs do this:
  1. Go To Blogger > Design > Page Elements
  2. Select a HTML/JavaScript Widget just under the header and paste the following code inside it,
drop down menu
<div id='mbtnavbar'>
      <ul id='mbtnav'>
        <li>
          <a href='#'>Home</a>
        </li>
        <li>
          <a href='#'>About</a>
       </li>
        <li>
          <a href='#'>Contact</a>
        </li>
  <li>
           <a href='#'>Sitemap</a>
            <ul>
                <li><a href='#'>Sub Page #1</a></li>
                <li><a href='#'>Sub Page #2</a></li>
                <li><a href='#'>Sub Page #3</a></li>
              </ul>

        </li>
      </ul>
    </div>
Replace # with your Page Links and the bolded text with relevant page names. The yellow highlighted code is responsible for the drop down menu. You can copy and paste it under any tab you want just before </li>
To add another tab just paste this code above </ul>
<li>
          <a href='#'>Tab Name</a>
        </li>
       
    3.   Now Go to Design > Edit HTML
    4.   Backup your template and search for ,
]]></b:skin>
     3.   Just above it paste the code below,
/*----- MBT Drop Down Menu ----*/

#mbtnavbar {
    background: #060505;
    width: 960px;
    color: #FFF;
        margin: 0px;
        padding: 0;
        position: relative;
        border-top:0px solid #960100;
        height:35px;
}

#mbtnav {
    margin: 0;
    padding: 0;
}
#mbtnav ul {
    float: left;
    list-style: none;
    margin: 0;
    padding: 0;
}
#mbtnav li {
    list-style: none;
    margin: 0;
    padding: 0;
        border-left:1px solid #333;
        border-right:1px solid #333;
        height:35px;
}
#mbtnav li a, #mbtnav li a:link, #mbtnav li a:visited {
    color: #FFF;
    display: block;
   font:normal 12px Helvetica, sans-serif;    margin: 0;
    padding: 9px 12px 10px 12px;
        text-decoration: none;
       
}
#mbtnav li a:hover, #mbtnav li a:active {
    background: #BF0100;
    color: #FFF;
    display: block;
    text-decoration: none;
        margin: 0;
    padding: 9px 12px 10px 12px;
       
   
       
}
#mbtnav li {
    float: left;
    padding: 0;
}
#mbtnav li ul {
    z-index: 9999;
    position: absolute;
    left: -999em;
    height: auto;
    width: 160px;
    margin: 0;
    padding: 0;
}
#mbtnav li ul a {
    width: 140px;
}
#mbtnav li ul ul {
    margin: -25px 0 0 161px;
}
#mbtnav li:hover ul ul, #mbtnav li:hover ul ul ul, #mbtnav li.sfhover ul ul, #mbtnav li.sfhover ul ul ul {
    left: -999em;
}
#mbtnav li:hover ul, #mbtnav li li:hover ul, #mbtnav li li li:hover ul, #mbtnav li.sfhover ul, #mbtnav li li.sfhover ul, #mbtnav li li li.sfhover ul {
    left: auto;
}
#mbtnav li:hover, #mbtnav li.sfhover {
    position: static;
}
#mbtnav li li a, #mbtnav li li a:link, #mbtnav li li a:visited {
    background: #BF0100;
    width: 120px;
    color: #FFF;
    display: block;
    font:normal 12px Helvetica, sans-serif;
    margin: 0;
    padding: 9px 12px 10px 12px;
        text-decoration: none;
z-index:9999;
border-bottom:1px dotted #333;
   
}
#mbtnav li li a:hover, #mbtnavli li a:active {
    background: #060505;
    color: #FFF;
    display: block;     margin: 0;
    padding: 9px 12px 10px 12px;
        text-decoration: none;
}
Make these changes:
  • Change #060505 to change background color of the Main menu
  • Change  the yellow highlighted text to change font color, size and family
  • Change #BF0100 to change the background of a tab on mouse hover
  • Change #BF0100 to change the background color of the drop down menu
  • Change #060505 to change the background color of drop down menu on mouse hover
      4.    Save your template and you are done!

Visit your Blogs to see a beautiful Navigation menu just below Header. Have Fun! :)
If you have any questions feel free to post them.

If you don't want to get yourself into Serious Technical Trouble while editing your Blog Template then just sit back and relax and let us do the Job for you at a fairly reasonable cost. Submit your order details by Clicking Here »

253 comments

PLEASE NOTE:
We have Zero Tolerance to Spam. Chessy Comments and Comments with 'Links' will be deleted immediately upon our review.
  1. Many many thanks..............
    http://www.mrinmay1971.blogspot.com/

    ReplyDelete
  2. Hi Mohammad, I am a new follower. Thanks for this helpful article. I have a question.

    In the first set of code, where we are defining the menu and sub-menu names, the code shows an href before 'Sitemap' main menu, which I don't want.

    Meaning, when a user clicks on say 'Sitemap' (as per this example), it should just expand the sub menus and not take the user to a page called 'Sitemap'. What do I do to remove the href element before 'Sitemap' in this coding?

    Any help would be highly appreciated. Thanks again :)

    ReplyDelete
  3. happy to add this visit to see my blog its look amazing
    http://earning-seotips.blogspot.com/

    ReplyDelete
  4. Hey, I was wondering why i can't change the font size or style (to bold) without losing the drop down function. Everytime i change the font size or the font to bold, the sub menus disappear when you move the cursor over them. Also, How can i center the writing? Thank you!

    www.theworldissimple.blogspot.ca

    ReplyDelete
  5. Thank you for this helpful tutorial! I got the drop down menu to work, but now I'm unsure of how to link my existing blog posts, or insert them, into the different sub pages. Any ideas?

    ReplyDelete
  6. i tried it and did what u instructed but drop-down menu but this is not working my new blog (http://pakistansnapss.blogspot.com/), plz guide me

    ReplyDelete
  7. help me out ... showing navigation bar in both header and footer :(

    ReplyDelete
  8. Three days I have spent on this and it still........doesn't work Grrrrr

    ReplyDelete
  9. Hi there,

    I've tried to create a drop down menu using several CSS codes (yours included- for some reason it didn't pick it up even when I started changing colours so I went back to my previous one) and I'm having the same problem with all of them.

    When I hover my cursor over the sub menu it disappears and won't let me click. Sometimes it works but mostly it doesn't. I think this happened when I changed the HTML code swapping the submenus around on one parent so the writing would fit in the tab. If I send you the link of my blog and the HTML code would you have a look at it and tell me if I've done something wrong?

    Maybe then I'll try your code and see if it works.

    ReplyDelete
    Replies
    1. I used your CSS code and pasted it into my HTML code as you said but it is appearing as a list. I know it does that when you first apply it before you touch the code, but with yours it stays the same no matter what. Sorry I forgot to post the link of my blog: http://azgreen786.blogspot.co.uk/

      Delete
  10. How about how to center the page text?!!!!! Nobody ever puts this info and it is the most difficult part to do. PLEASE TELL HOW TO CENTER THE PAGE TITLES!!!!!!!! This code is useless without this information. I've been trying everything and NOTHING works!!! Ugghh!!!!!!!

    ReplyDelete
  11. thanks for this sir.thanks for helping us.plus 1!

    ReplyDelete
  12. Hi, I tried this code. But its not working for me.can you please help me out. :-(

    ReplyDelete
  13. thank you so much
    big help

    ReplyDelete
  14. Thank you MBT. Among all tutorials, you're one of the best.

    ReplyDelete
  15. Hello... I'm starting my first blog. In your tutorial about How To Create a Drop Down Menu, I just want to ask you where I should paste the script code in ]]>. I have tried but did not succeed, Can you explain me more details?

    ReplyDelete
  16. Thanks for such a nice post, working fine for me
    .
    Regards Subha S.
    Admin "myearlymorningblog.blogspot.com"

    ReplyDelete
  17. i have created blog Menu and sub menu.please tell me how can i post content at the menu and sub menu (without Home page) cause my every post going to my Home page.what should i do now???tell me

    ReplyDelete
  18. Please Sir help me it cant show as drop down like in my blog what i can do please help me :(

    ReplyDelete
  19. where to find this
    ]]>
    not able to make changes because of it....cant find please help

    ReplyDelete
  20. how to take backup of template?
    please help

    ReplyDelete
  21. Hello,
    thank you very much for the tutorial. I have followed all of your instruction and everything works perfectly except the drop down part, could you help me on this? I'm still new in coding so I have no idea what to do to make the drop down menu works :(

    thank you,
    Ninn

    ReplyDelete
  22. One more question (Im sorry)
    I now could successfully make the drop down menu appear but when the sub menu disappears before I can even click it, is there any way to solve this?

    thank you, again and sorry for the trouble :(
    Ninn

    ReplyDelete
  23. Hi,
    I have looked at all code and used the same and also applied under header in html.The problem is it shows complete drop down , but when I go to click on drop down links , it just disappears.Could you please check here on sample blog.
    http://marutistotra.blogspot.in/

    ReplyDelete
  24. where i find "go to design" option

    ReplyDelete
  25. Will the current appearance (The color, font and shape) of my blog remain, when I add these sub tabs?

    ReplyDelete
  26. i got a headache make sub menu ...
    my blog is http://terapiozonbekasi.blogspot.com/
    i want to make submenu for "Layanan Kami" - "Terapi Ozon"

    Terapi Ozon Vagina and Terapi Ozon Anus, the position should below "Terapi Ozon"

    i make like this
    http://tinypic.com/r/10pqfe8/8

    but it become one sub menu with the others
    can u help?

    ReplyDelete
  27. thanjs buddy..how to side menu in drop down menu

    ReplyDelete
  28. Thank you so much for this code it finally work.

    ReplyDelete
  29. This comment has been removed by the author.

    ReplyDelete
  30. Hiya, great tutorial! This is my blog design (still working on it).

    How do i tweak the positioning of the sub-menus?

    ReplyDelete
  31. Hi. I already have Pages in my Blog. Just need to add menus and sub-menus under them. Would you Please help?

    ReplyDelete
  32. Thanks! Really Really simple and useful! Just had to change float: left to float: right to support RTL! Will change style later

    ReplyDelete
  33. I was able to apply this to the Simple template in Blogger and modify it a bit to match my needs. But for the life of my I can't get it to stretch the entire length of my header. Any thoughts as to what I am doing incorrectly?
    http://meraustaad.blogspot.com/

    ReplyDelete
  34. Hey ... thankyou soooooo much for this tutorial, other dropdown menu tutorials have been driving me TOTALLY crazy for a whole week! Yours worked first time esp. as I had read down in the comments to put the code under in the HTML template...I could never get them to fully drop down before. Big mahoovise thankyou! I intend to give you a shout-out post and a link once I am properly up and running :)
    One little incy question though, the end button for home just kind popped up unexpectedly and I can't seem to edit it's appearance??
    D

    www.dollysdisco.blogspot.com

    ReplyDelete
  35. It works perfect!!! Thanks for the easy understandable post! I want to know how to add the drop down menu to link to a jump link like the different parts of a page?

    ReplyDelete
  36. wow it's amazing, love it. i applied it through template html but it doesn't cover my complete 'outer wrapper',, can u tell me how to increase it's width?

    ReplyDelete
  37. Cool , u have done great job thanks a lot for sharing this.

    ReplyDelete
  38. The only problem is I have no Add Gadget option under the header it is only available for the side bar and bottom of page :(

    ReplyDelete
  39. thank U so much... it's so simple...

    ReplyDelete
  40. this tutorial is awesome i got half of the features for my blog from you thanx a lot and i have also added this dropdown menu in my blog however i m having the same problem as @alex, that is if i increase the size of fonts from 12px to 13px or any other the dropdown menu disappears when i hover mouse on it. plz tell me how to solve this problem.

    my blog: http://examcornerpk.blogspot.com

    ReplyDelete
  41. hi i saw your website and its really great. today is december 2015 going to 2016 and this my first time to have a blogsite. what i mean is i am having hard time. i am having a problem with links of sub menus and the color. can u pls help me. thank you

    ReplyDelete
  42. Hi, my menus are up, but no drop down boxes, not sure what I have done wrong, I will work on renaming them all now, but I need help converting to drop boxes, please, love your tutorials they seem so easy now I feel like an idiot. thanks www.costaricahappy.com

    ReplyDelete
  43. Hi,
    Thanks for your help. I was trying to add drop down menu, Your tutorial is working but I can't add sub menus under a sub menu. Can you help me please??

    ReplyDelete

  44. my sub menus get hidden when i am in other page or labels. sub menu get go downward than that page, only working on home page why please give some ideas?

    ReplyDelete
  45. Hello, I would like to put a submenu in my page but I want the same design. I dont want to change it. I just wanted to add the submenu. Please Help.

    ReplyDelete
  46. Hi! I've been trying to get the menu to work however I can't make the menu colour the same as the tab colour.... also how do I get rid of the black lines in between the tabs and how do I change the height of the drop-down menu? Website:http://cgameworld.blogspot.com/

    Thank You!

    ReplyDelete
  47. hi sir my blog templet for awesome inc aa tempalet me yah koD is not working then Travel templet me work karata hai to awesome inc templet ke liye kod ya kod lagaane ka tarika bataie

    ReplyDelete
  48. wow tymz for this trick nd now i want to link videos in that dropdown menu . plz suggest me how to do

    ReplyDelete
  49. Hi, Great help, you made life very simple for non professional, just two question and hope will get the answer soon. 1. horizontal navigation menus given on above link is complete set or it need be used with above mentioned codes and second seo is giving error of too many java script and csc code, will this have impact on indexing. may i request to review my blog, have submit my request on your site for customisation but not got any reply on same.

    ReplyDelete