Wednesday, December 7, 2011

Create a Drop Down Menu In Blogger

Posted by Atif Imran at 11:05 AM
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:

Sign in Your Blogger Account
Go To " Dashboard "
Click on " Design "






Select a HTML/JavaScript Widget just under the header and paste the following code inside it,


Here is " Html Code "
    <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>

Important Tip

Replace # with your Page Links and the bolded text with relevant page names.

Next Step
Click on " Design " Tab
Click on " Edit Html " Tab
First of All Backup your template and Press " Ctrl + P "
Search this Code

]]></b:skin>
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;
}



Custmizing
  • 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
OK ----Now Click on " Save Template "

Open Your Blog and See The Result
Cradit
Mybloggertrick.com

See This Video Tutorial


Follow Me on Pinterest Pin It Now!

If you enjoyed this post and wish to be informed whenever a new post is published, then make sure you subscribe to my regular Email Updates. Subscribe Now!



Kindly Bookmark and Share it:

YOUR ADSENSE CODE GOES HERE

15 comments:

Atif Imran on December 7, 2011 at 11:56 AM said...

hardworking


Tawtaw on February 6, 2012 at 3:51 PM said...

nice good work thanks....but menu bar exceed out of the page is there any help ror that plese...


Atif Imran on February 6, 2012 at 10:41 PM said...

error in your template css area


Sumera Muslim on February 7, 2012 at 2:18 AM said...

wow great job


Atif Imran on February 9, 2012 at 9:48 PM said...

very usefulinfo..........
smart phone


cocktaildresses on February 22, 2012 at 2:29 AM said...

I love it,Excellent article.I am decide to put this into use one of these days.Thank you for sharing this.Success!
_______________________________________________________________________
Cocktail Dresses|Maternity Wedding Dresses|Plus Size Mother of Bride Dresses


theWriter on February 26, 2012 at 12:10 PM said...

very helpfull, thank You a lot :)


laily mustapha on March 7, 2012 at 8:05 AM said...

•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

Thanks...very useful indeed. But how do i change the above colour code? Is there any reference? Tks


Ranjit Singh on March 9, 2012 at 9:01 AM said...

if you are copying from my blogger tricks atleast have some common sense,,change mbt to some other word


Atif Imran on March 9, 2012 at 10:01 AM said...

@Ranjit Singh
He is my teacher


Jawwad Rafiq on March 17, 2012 at 1:46 PM said...

my drop menu list is not showing.
and not droping while clicking.
its same to same appeared.
like that.
list
sublist sublist1 sublist 3

help me.


Atif Imran on March 17, 2012 at 11:48 PM said...

@Jawwad Rafiq
Change colors


TheosMummy on March 23, 2012 at 2:13 PM said...

help me the drop down menu isnt working done as said


Rituparn@ sonowal on March 24, 2012 at 10:30 AM said...

nice tutorials i will use this on my blog.


Interesting facts on May 4, 2012 at 1:53 AM said...

Thanks for sharing your info. I really appreciate your efforts and I will be waiting for your further write ups thanks once again.
html5 media player


Have any question? Feel Free To Post Below:

popular

Related Posts Plugin for WordPress, Blogger...
 

recent

© 2011. All Rights Reserved | Atif980

Home | Design | Black Hat SEO | Top