December 16, 2010
0
A simple Drop Down Menu For Blogger
Drop 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:
Drop Down Menu for Blogger
Live Demo
Follow these steps to add a drop down menu to your Blog:
1. Go to Layout->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 = &#39;hidden&#39;;
// get new layer and show it
ddmenuitem = document.getElementById(id);
ddmenuitem.style.visibility = &#39;visible&#39;;
}
// close showed layer
function mclose()
{
if(ddmenuitem) ddmenuitem.style.visibility = &#39;hidden&#39;;
}
// 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):
Customize Drop Down Menu for Blogger
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
ColorSchemer
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 Layout>Page Elements
b.Then click on Add Gadget
Sidebar Add Gadget c. Then select HTML/JAVASCRIPT 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>

0 comments:

Labels

INTERNET (141) HACKING TRICKS AND TIPS (129) SYSTEM TRICKS (104) OTHERS (93) HOW TO (88) GPRS TRICKS (84) AIRTEL TRICKS (68) FREE GPRS (61) 4SHARED TRICKS (60) MOBILE TRICKS (56) HOT TRICKS (52) 3G TRICKS (50) TRICKSNEW (50) WINDOWS TRICKS (45) MOBILE HACKS (44) SOFTWARE (41) HACKING TRICKS (40) CALL TRICKS (38) MINI PROJECTS (35) FUN TRICKS (33) IEEE PROJECTS (31) FACEBOOK TRICKS (30) AIRCEL TRICKS (29) Mobile Tips (28) DOWNLOAD (27) COMPUTER TRICKS (26) AIRTEL 3G HACK(100%) WORKING (25) ALL NETWORK TRICKS (25) DOCOMO TRICKS (25) FREE SMS HACKS (23) PASSWORD HAKING (23) LEARN-HACKING TRICKS (22) OTHER PROJECTS (22) FREE CALL TRICKS (20) NOTEPAD (20) gmail (19) HACKERS (18) RELIANCE TRICKS (18) ANTI-VIRUS (16) TATA DOCOMO TRICKS (16) VIRUS (16) AIRCEL 3G HACK(100%) WORKING (15) IDEA TRICKS (15) BROWSING TRICKS (14) SMS TRICKS (14) account (14) FREE SMS WEBSITES (13) VODAFONE TRICKS (13) FREE FAKE MAIL (12) MOBILE SOFTWARE (12) secret code (12) E-MAIL (11) FREE SMS CRICKET ALERT (11) OPERA HACK (11) ACKING TRICKS (10) CRACKING TRICKS (10) INDIA MATCH LIVE STREAMING ONLINE FREE (10) BSNL TRICKS (9) E-MAIL BOMBERS (9) FREE FAKE CALLS (9) SERIALS (9) SMS BOMBERS (9) premium account (9) ALL RESULTS (8) CHEAT CODES (8) GAMES DESIGN PROJECT (8) HOTFILE TRICKS (8) MINI PROJECTS-CSE (8) MINI PROJECTS-MCA (8) MOBILE APPLICATIONS (8) MOBILE TV (8) SEND SMS NOW (8) SOURCE CODES (8) portable application software (8) CHINA MOBILE (7) FREE MOBILE TV (7) PAYPAL ACCOUNT HACK (7) TUTORIAL (7) TV ONLINE (7) BALANCE TRICKS (6) CHATTING TIPS (6) Free SMS Websites (6) GOOGLE+ (6) INTERVIEW (6) PLACEMENT TIPS (6) UNINOR TRICKS (6) WATCH TV FREE (6) YOU TUBE TRICKS (6) avoid hacking (6) MEMORY CARD (5) PAPER PRESENTATION (5) RESULTS (5) VOIP CALLS (5) command prompt (5) BLUETOOTH TIPS (4) EXAM DATES (4) LEARN-HACKING (4) MOST NEEDED TRICKS (4) SOURCECODE (4) TORRENTS (4) WEB PROJECTS (4) Amazon (3) E-BOOKS (3) FIREFOX (3) FREE CRICKET MATCH 2011 LIVE STREAMING (3) JOBS (3) MODEM (3) RECHARGE TRICKS (3) VIDEOCON TRICKS (3) VIRGIN TRICKS (3) ANDROID (2) BOMBERS (2) C#.NET (2) CRICKET LIVE STREAMING (2) FREE MOVIE DOWNLOAD (2) HR ROUND (2) IPHONE TRICKS (2) IPL MATCH FIXING (2) Inspirational Success Stories - Zero to Hero (2) JAVA CODE (2) MTNL (2) MTS TRICKS (2) Mobile Number Portability (2) ONLINE-FREE SHOPPING (2) PROJECTS (2) TATA INDICOM (2) YAHOO (2) Cashback (1) DCE (1) DOWNLOAD MENU (1) DTH TRICKS (1) FREE SUBSCRIPTION ALERTS (1) GRAMMAR (1) IMAGE TRICKS (1) LINUX (1) MATLAB PROJECTS (1) MICROCONTROLLER PROJECTS (1) MOTOROLA (1) Most Common Interview Mistakes to Avoid (1) NANOPARTICLES IN THE DRUG DELIVERY (1) ONLINE EARNING (1) PEN DRIVE (1) PHISHERS (1) RAPIDSHARE TRICKS (1) Swiggy (1) TECHNICAL JOKES (1) TOLL FREE CONTACT NUMBER LIST (1) UBUNTU (1) WHATSAPP HACK (1) Wi-Fi (1) Zomato (1)