Horizontal Multi Level Drop Down Sub Menu Links Blogger



Horizontal Multi Level Drop Down Sub Menu Links Blogger,you can show submenus in drop down form in top menu of your blogger as this is drop down menu to show of the subcategories under the certain category to make of the browsing for the reader easy and simple to find what he wants,as this was used in wordpress blogs but now you can use it in blogger blogspot too.

Demo of Horizontal Multi Level Drop Down Sub Menu Links:- Horizontal Menu Links Demo

The tutorials i hold before on horizontal top menu links for blogger without the drop down sub menu are below:-
1)Top Menu Links For Blogger
2)Horizontal Menu Links For Blogger
3)LinkList As Horizontal Top Menu Links For Blogger

Now let's carry On with our tutorial

Just Go To Layout > Edit Html

And Search For </b:skin>

Now add these below Css codes before it-


.ddsmoothmenu{
font: bold 12px Verdana;
background: #414141; /*background of menu bar (default state)*/
width: 100%;
}

.ddsmoothmenu ul{
z-index:100;
margin: 0;
padding: 0;
list-style-type: none;
}

/*Top level list items*/
.ddsmoothmenu ul li{
position: relative;
display: inline;
float: left;
}

/*Top level menu link items style*/
.ddsmoothmenu ul li a{
display: block;
background: #414141; /*background of menu items (default state)*/
color: white;
padding: 8px 10px;
border-right: 1px solid #778;
color: #2d2b2b;
text-decoration: none;
}

* html .ddsmoothmenu ul li a{ /*IE6 hack to get sub menu links to behave correctly*/
display: inline-block;
}

.ddsmoothmenu ul li a:link, .ddsmoothmenu ul li a:visited{
color: white;
}

.ddsmoothmenu ul li a.selected{ /*CSS class that's dynamically added to the currently active menu items' LI A element*/
background: black;
color: white;
}

.ddsmoothmenu ul li a:hover{
background: black; /*background of menu items during onmouseover (hover state)*/
color: white;
}

/*1st sub level menu*/
.ddsmoothmenu ul li ul{
position: absolute;
left: 0;
display: none; /*collapse all sub menus to begin with*/
visibility: hidden;
}

/*Sub level menu list items (undo style from Top level List Items)*/
.ddsmoothmenu ul li ul li{
display: list-item;
float: none;
}

/*All subsequent sub menu levels vertical offset after 1st level sub menu */
.ddsmoothmenu ul li ul li ul{
top: 0;
}

/* Sub level menu links style */
.ddsmoothmenu ul li ul li a{
font: normal 13px Verdana;
width: 160px; /*width of sub menus*/
padding: 5px;
margin: 0;
border-top-width: 0;
border-bottom: 1px solid gray;
}

/* Holly Hack for IE \*/
* html .ddsmoothmenu{height: 1%;} /*Holly Hack for IE7 and below*/


/* ######### CSS classes applied to down and right arrow images ######### */

.downarrowclass{
position: absolute;
top: 12px;
right: 7px;
}

.rightarrowclass{
position: absolute;
top: 6px;
right: 5px;
}

/* ######### CSS for shadow added to sub menus ######### */

.ddshadow{
position: absolute;
left: 0;
top: 0;
width: 0;
height: 0;
background: silver;
}

.toplevelshadow{ /*shadow opacity. Doesn't work in IE*/
opacity: 0.8;
}



Now search for </head> and place the below codes before it.


<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js' type='text/javascript'/>
<script src='http://btemplatescripts.googlecode.com/files/ddsmoothmenu.txt' type='text/javascript'/>



Now Search for below codes-

<div id='header-wrapper'>
<b:section class='header' id='header' maxwidgets='1' showaddelement='no'>
<b:widget id='Header1' locked='true' title='Testing templates (Header)' type='Header'/>
</b:section>
</div>

And add the below codes after the above codes:-


<div class='ddsmoothmenu' id='smoothmenu1'>
<ul>
<li><a href='http://www.anshuldudeja.com'>Item 1</a></li>
<li><a href='#'>Folder 0</a>
<ul>
<li><a href='#'>Sub Item 1.1</a></li>
<li><a href='#'>Sub Item 1.2</a></li>
<li><a href='#'>Sub Item 1.3</a></li>
<li><a href='#'>Sub Item 1.4</a></li>
<li><a href='#'>Sub Item 1.2</a></li>
<li><a href='#'>Sub Item 1.3</a></li>
<li><a href='#'>Sub Item 1.4</a></li>
</ul>
</li>
<li><a href='#'>Folder 1</a>
<ul>
<li><a href='#'>Sub Item 1.1</a></li>
<li><a href='#'>Sub Item 1.2</a></li>
<li><a href='#'>Sub Item 1.3</a></li>
<li><a href='#'>Sub Item 1.4</a></li>
<li><a href='#'>Sub Item 1.2</a></li>
<li><a href='#'>Sub Item 1.3</a></li>
<li><a href='#'>Sub Item 1.4</a></li>
</ul>
</li>
<li><a href='#'>Item 3</a></li>
<li><a href='#'>Folder 2</a>
<ul>
<li><a href='#'>Sub Item 2.1</a></li>
<li><a href='#'>Folder 2.1</a>
<ul>
<li><a href='#'>Sub Item 2.1.1</a></li>
<li><a href='#'>Sub Item 2.1.2</a></li>
<li><a href='#'>Folder 3.1.1</a>
<ul>
<li><a href='#'>Sub Item 3.1.1.1</a></li>
<li><a href='#'>Sub Item 3.1.1.2</a></li>
<li><a href='#'>Sub Item 3.1.1.3</a></li>
<li><a href='#'>Sub Item 3.1.1.4</a></li>
<li><a href='#'>Sub Item 3.1.1.5</a></li>
</ul>
</li>
<li><a href='#'>Sub Item 2.1.4</a></li>
</ul>
</li>
</ul>
</li>
<li><a href='http://www.anshuldudeja.com/'>Item 4</a></li>
</ul>
<br style='clear: left'/>
</div>


Thats It Now Preview It.If its working fine just save your template.

You can download the tutorial and files needed for back up from given link Files And Tutorial

Change the names and links whatever you want to be shown in your blogger in above codes as you have to do this manually but its good if you wanna show sub category under some category.
You can make look your blog as you have subcategories for categories in your blogspot blog by hiding the labels in sidebar widget and giving the category names so as you can create subcategory of any.
Its so easy,i hope will like this tutorial.
Source:-Dynamicdrive

58 comments:

akash said...

I think this is really neat

more templates http://www.itemplatez.com

These Mommy Moments said...

Thanks so much, Anshul! I really appreciate it! I tweaked it a bit but still have one small problem... The top row of drop downs are hidden behind the second row:
http://thesemommymoments.blogspot.com

Any suggestions are greatly appreciated!! Thanks again!

Anshul said...

@ Mommy Moments i saw your blog and understand your problem but you menu is long instaed of one line so it will difficult to solve that problem but make it look as work proper for you.

1)Keep all the single links like home home and about us on upper side.

2)If still there are some links with sublinks on top part heep there 1st submneu blank or repeat 1st one twice so that it may not be hidden from reader.Will seem as your submneu is starting from just bottom of menu not from top part.

I hope this willl be better solutin for you.

Ali Uğur Şimşek said...

hi..

I cannot add sublinks to my linkbar.. please help me:

http://turkiye-ab.blogspot.com

Anshul said...

hey you have just simple menu installed in your blog not the above widget friend.

Shivani Saini said...

Thnx Anshul, I really appreciate it but still have a problem...The drop downs menu sub menu options are not visible....please help me !

http://www.Xperiencemedia.blogspot.com

Anshul said...

ya seen its not working just do one thing try use only links of mine in tutorial you added in step 3 to place the links dont add your links.If mine demo links also not works as in demo blog then just send me codes as i said above will make it work and send you.

Peter Larson said...

Worked great for me - thanks a bunch!

Peter Larson said...

Question - I have this working well with one exception - when I open dropdowns they appear behind page content like images, and appear to be semitransparent in some cases. Is it possible to force the dropdowns to always appear in front of page content, and to remove the transparency?

Here's my site for reference: http://www.runblogger.com/

Thanks so much for your help - this site is great!

Anshul said...

@ peter its working fine as its dropdown are above images in my demo blog and its working also great in yours blog,as the menu has been given property of absolute or fixed so menus will appear all other things the only case might come problem if other thing too is fixed or absolute.

Peter Larson said...

Anshul - yes, I figured out how to make a few modifications that helped. Turns out the problem wasn't with uploaded images, but those supplied by Zemanta and Youtube videos. I still can't figure the Zemanta problem, but I got the dropdowns to overlay YouTube videos properly by adding wmode="transparent" to the embed code for the youtube video.

With Zemanta images, I got the menu to properly overlay the image by adding the "z-index: 99;" and "position: absolute;" lines to the following segment of code:

/*1st sub level menu*/
.jqueryslidemenu ul li ul{
position: absolute;
left: 0;
display: block;
visibility: hidden;
z-index: 99;
position: absolute;
}

I still have a problem with the Zemanta image link overriding the dropdown menu links. To see what I mean, go here:

http://www.runblogger.com/2009/06/running-when-youre-not-feeling-it.html

Scroll to Post Topics -> Running in the menubar and you'll see that scrolling to any item that overlaps the umbrella image (starting with "Questions") makes the menu dropdown disappear. Strange. Any thoughts on a fix?

Thanks so much for your help!

Anshul said...

@ peter ya i checked as you said and your links are showing me on umbrella image as they should be they are not hiding.I use mozilla its workng fine in it and about explorer i dont know.

Peter Larson said...

The problem is that the dropdown menu links do show over the image, but once you put the cursor on any that are directly above the image the menu disappears (e.g., I try to click on "Questions" and I cannot). It's as if the link embedded in the umbrella image is overriding those in the menu. I'm using Firefox 3.5. Thanks again!

Anshul said...

@ peter ya sorry i didn't noticed it previously here is problem but this can't be solved as you are usign some type of tooltip for images and that two using javascript .So when both comes on each other there is clash among javacripts and that is bound to happen.And in blogger platform this clash takes much.

To keep both working only advice i can give is edit post and make mage somewhat middle in post or remove that image tooltip you ae usng.

Peter Larson said...

Thanks - that's kind of what I figured. As long as it's just that one Zemanta tool causing the problem I can work around it as you suggest. Thanks for your help, you have a nice site!

unknown said...

Now First download this file and upload to your own server slidemenu_horiz.js

I dont HAVE ANY SERVER.
i REALLY WANT TO ADD THIS TO MY BLOG.
nOW HOW IS THAT POSSIBLE ??
PLZ. HELP

Anshul said...

@unknown just get the free server list form here
Free Servers

Centre for Distance Education said...

It was great..........
I istalled it successfully
Thanks a lot
(waqar-blog.blogspot.com)
(amu-de.blogspot.com)

Jack said...

why cannot open the file...with code eror 800A1391 'document' is undefined

Anshul said...

@jack its opening fyn..check again

Maor B. said...

Hi,

I have a bit problem with IE7 and grand children.
Firefox and Chrome are fine, but in IE7 a grand children menu item goes to the side "running" far away and is not closed to the child, like it should b.

Any ideas?

Maor B. said...

I forgot to wright, you can find a demo of this page at www.wptest.maorb.info

It's in Hebrew so the direction is rtl, but you can see the menus... :)
Thanks

Anshul said...

@marob ya in ie7 its problem as your menu seems too close to header and content section might creating problem.Just keep margin from below.

Maor B. said...

@Anshul I've tried to add margin, but that's no helpful and doesn't fix the problem..
Any other ideas?

The test is on www.wptest.maorb.info

Maor B. said...

Well, found the solution!
Since the calculations were auto generated via the js and not through the css, I added an IE7 hack to the header file to set the left margin to 100%. God, I hate IE.

(ofcourse the brackets should be added, I've omitted them to let the code shown in the reply)

!--[if lte IE 7]
style type="text/css"
html .jqueryslidemenu ul li ul li ul li {left: 100%;}
/style
![endif]--

Anshul said...

its good you have done with it. Remove that css just remove it instead of making like this as you have disabled it with the remove of brackets.

Hill Country Scouts said...

Are there any fixes for the children in IE7. When I scroll over the parent, the children appaer and then when i scroll over the children they disappear. I do not have this problem in IE 8, Firefox, or Safari.

my problem is here: hillcountryscouts.org

I HATE IE! Can anyone help.

NonStop Networks, LLC said...

Thank You Peter Larson, this post is much appreciated. wmode="transparent" allowed my menu to show over the You Tube Video.

Aaron
http://www.nonstopnetworks.net

Anonymous said...

Oh my!!! Please, PLEASE CHANGE THE FONT COLOR AND BACKGROUND ON THIS WEBSITE!!!! Holy crap I've never seen anything like this! AAAAAHHHHHHHHH!!!!!!!!!!!

Crystal said...

Thanks!!

How do you center this menu bar?

Ducamel01 said...

Dear Anshul,

I have been trying to download the slidemenu_horiz.js for two days, but it keeps telling me that the user has exceeded the maximum allowed bandwidth! Could you please help me with this problem? Perhaps you could send me the file via e-mail.

Thank you in advance.

Anshul said...

@ducame01 i have changed the server now you can download it .

kiran said...

Hi Anshul how to upload file in blogger site

FACULDADE DE DIREITO - UFRRJ said...

Anshul, thanks a lot for your help! I'm really grateful!

But I have a final question for u... ;/

I've add this "Horizontal Multi Level Drop Down Sub Menu" and deleted the original submenu and the search form that came with the "The Latest" template. But there's still a gray space (kind of a grey stripe) bellow the "Blog Title"... :(

Can you help me to remove this space, where used to be the original submenu of the "The Latest template"?

I took some printscreens to show u better:

1) This is how the blog looks now:
http://img697.imageshack.us/img697/1492/89907054.jpg

2) The wanted result:
http://img130.imageshack.us/img130/976/14468563.jpg

Pleaseee help me dude!

And thankss a looooooot for yourh templates and this helpful blog :D

* and sorry about my english lol :/

FACULDADE DE DIREITO - UFRRJ said...

I've found the answer ;)
Just nid to change the value of "header-wrapper height" to 130px :D
I guess i'm learning something with u ;)

But thanks a lot anyway :D

Anshul said...

@faculdade actually that header is whole image it will get remove whole but reducing height also did it good work

Lord Zero2 said...

Hi there! (: I was wondering,how you can center the menu? I've tryed placing the center code everywhere,but it won't work! Please help!

Tammy said...

Hi there,

This menu looks great, but for some reason the drop down submenus do not show up. Everything else is perfect! Can you help me? I really hope I can use this!

Anshul said...

@tammy working fine in demo means its working.You might be making some mistake.Your codes also seems right you addded i checked.Where you have addded links in your blog remove from there.Just find this in your codes and add after it.


Try this.

Tammy said...

Hi Anshul,

I don't understand, the drop downs haven't been there since I initially added all the codes. where might the error be? Are you suggesting I remove the links in the html of my blog? Like the 'http://myblog.com'? and what do you mean "find this in your codes and add after it"? I'm sorry, i'm very new to this stuff! Thank you for all your help!

Tammy said...

Hi Anshul,
Sorry to be a pain, I started over and was able to get the drop downs to work. Unfortunately though the drop downs are horizontal, is there a way for the dropdown to appear as a list vertically?

Thank you for your help!

Anshul said...

@tammy you have to find different tutorial for it.Just search on google.

Sankara Subramanian C said...

Hi Anshul,

I followed your steps one by one, but am unable to replicate the desired effect on my testing blog http://testingsankara.blogspot.com/. I have even opened the javascript and copied it into the blogger code as per your other post.

Once settled, i intend to use this on my main blog http://www.beontheroad.com....

Could you please guide me here?

BTW, I absolutely love your posts and hacks...you are a godsend to a lot of non-technies like me.

Anshul said...

@sankara i have updated the post.

Sankara Subramanian C said...

Thank you Anshul! It is working well on my testing site. I will update you as soon as it is up on my live blog site.

Thanks a ton again!

Krishna said...

works for me, thnx.
(ilovelongdrives.blogspot.com)

Pink Mooki said...

hi is there any tutorial for purchasing item?

Like this blog is using:
http://appleiphonecables.blogspot.com/2009/01/apple-ipod-iphone-dock-connector-to-usb.html

"YOu may also like" option...

Anshul said...

@pink its just buy link taken from amazon and posted.

Balu said...

Hi Anshul

can u please tell me how to centre the menu bar

www.moviesandmasti.com

thanks in advance

Anshul said...

@balu it will be to left only in this.

Balu said...

Hi anshul

thanks for ur reply, but how to make this in centre, if not is there any other dropdown menus that are in centre and fixed.

Thank u in advance

Anshul said...

@bal no they will remain to left only.

A Moms Rantings said...

THANK YOU ! I have been searching for days now, using code after code only to result in epic failure. YOUR code WORKS.. IE8 compatible and also works with bloggers new TEMPLATE designer -as of july 2010. YOU saved my sanity.

Etc..Etc.. said...

hi! im trying to follow your instructions,but it still not works... help!

filokalos said...

it doesn't work with the new template designer and IE8 :-(

doshanivarthi said...

Hey...it;s great....how to move the menu in the top of the blog.how to move the top side of the header..

SHIVASHEESH YADAV said...

anshul , it was a great menu . but the only problem is that it is not in the center . url : www.freedownloadersheaven.blogspot.com

Post a Comment