Do your blog have large no. of posts with different category?Then you must need a dropdown menu for your blog.You may already seen this on many blogs.It's contained css,so doesn;t even affect much your blog loading speed too.So want one for your blog?here it is.
How to Add This?
- log onto blogger dashboard > template> edit html > proceed
- now find ]]></b:skin> [press ctrl+f]
- now paste following code above ]]></b:skin> tag
/*----- TTH Drop Down Menu ----*/
#tthnavbar {
background: #2a2626;
width: 100%;
color: #FFF;
margin: 0px;
padding: 0;
position: relative;
border-top:0px solid #7f7777;
height:35px;
}
#tthnav {
margin: 0;
padding: 0;
}
#tthnav ul {
float: left;
list-style: none;
margin: 0;
padding: 0;
}
#tthnav li {
list-style: none;
margin: 0;
padding: 0;
border-left:1px solid #333;
border-right:1px solid #333;
height:35px;
}
#tthnav li a, #tthnav li a:link, #tthnav li a:visited {
color: #FFF;
display: block;
font:normal 12px Helvetica, sans-serif; margin: 0;
padding: 9px 12px 10px 12px;
text-decoration: none;
}
#tthnav li a:hover, #tthnav li a:active {
background: #6c6464;
color: #FFF;
display: block;
text-decoration: none;
margin: 0;
padding: 9px 12px 10px 12px;
}
#tthnav li {
float: left;
padding: 0;
}
#tthnav li ul {
z-index: 9999;
position: absolute;
left: -999em;
height: auto;
width: 160px;
margin: 0;
padding: 0;
}
#tthnav li ul a {
width: 140px;
}
#tthnav li ul ul {
margin: -25px 0 0 161px;
}
#tthnav li:hover ul ul, #tthnav li:hover ul ul ul, #tthnav li.sfhover ul ul, #tthnav li.sfhover ul ul ul {
left: -999em;
}
#tthnav li:hover ul, #tthnav li li:hover ul, #tthnav li li li:hover ul, #tthnav li.sfhover ul, #tthnav li li.sfhover ul, #tthnav li li li.sfhover ul {
left: auto;
}
#tthnav li:hover, #tthnav li.sfhover {
position: static;
}
#tthnav li li a, #tthnav li li a:link, #tthnav li li a:visited {
background: #6c6464;
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;
}
#tthnav li li a:hover, #tthnav li li a:active {
background: #2a2626;
color: #FFF;
display: block; margin: 0;
padding: 9px 12px 10px 12px;
text-decoration: none;
}
- Now save the template
- goto layout and add a gadget
- select html/javascript
- and paste following code in it
<div id='tthnavbar'>
<ul id='tthnav'>
<li>
<a href='#'>Home</a>
</li>
<li>
<a href='#'>Contact</a>
</li>
<li>
<a href='#'>About</a>
</li>
<li>
<a href='#'>Blogging</a>
</li>
<li>
<a href='#'>Services</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>
<li><a href='#'>Sub Page #4</a></li>
<li><a href='#'>Sub Page #5</a></li>
</ul>
</li>
<li>
<a href='#'>Create This ></a>
</li>
</ul>
</div>
Customization
- if you want to change menu colour change this #2a2626
- if you want to change colour of menu backgroun on mouse hover change this #6c6464
- if you want to change dropdown colour change this #6c6464
- replace # with your menu link and names with your titles
Post a Comment