Advanced Search Usage Terms Submit Contact
Dynamic Drive CSS Library
 
CSS Library
Submit an original CSS code
CSS Layouts
Web Graphics
Online Tools:

Advertise Here

CSS Library: Vertical CSS Menus: Here

SuckerTree Vertical Menu (v1.1)

Author: Dynamic Drive

Nov 8th, 06: Fixed rendering issue in IE7, plus added support for automatic detection of sub menus width. No more configuring the "left" attributes!

This is a vertical, predominantly CSS based (with a touch of JavaScript) multi-level menu. It supports as many sub levels as you desire, plus multiple Suckertree menus on the same page. The CSS and JavaScript automatically adopts to your HTML code in each case.

The trick to Suckertree is a small adoptable piece of JavaScript that crawls the inner levels of a list menu and assigns the appropriate show/hide behavior to them. This differs from Suckerfish menu, which merely uses JavaScript to compensate for IE's shortcomings when it comes to CSS, so the menu is more rigid and requires manual changes to the CSS as the number of levels in your menu changes.

Demo:

The single image:

The CSS:

The HTML:

Code Info

Rate this code:

Date Posted: 11/08/2006

Revision History: Updated Nov 8th, 06' to version 1.1

Usage Terms: Click here

Your Comments (250)

Got a question or need help customizing this CSS code? Post it in the CSS Forums. If you have a comment or suggestion instead, post it in the comments section below.

Comment Pages 8 of 25 pages « First  <  6 7 8 9 10 >  Last »

Love this menu. I've got it working in FF and IE for windows, but I'm having trouble with macs. In Safari, the submenus are not folding out (wonder if it is a issue with the javascript) and ie:mac is also not folding out as well as the styling is not interpreting correctly (text color and width/height of "buttons"). Any ideas?
Posted by Ryan Petrik on 01/10, 12:41 PM
Thanx for your menu, I Luv this menu, but i hv one problem with this. This will works perfectly on IE but In Opera all the Menu and their sub-menus shows in one column.

Please help if any one knows, how to rectify it?
Thanks again
Posted by Bhupinder K Dhawan on 01/11, 09:13 AM
Have you tried this in Netscape 8.x? Any sub dropout menu li link AFTER the first one cannot be selected. Nice work. Wish I could figure it out! :)
Posted by Mister Peabody on 01/11, 01:47 PM
hi,
really good .. i am trying make this dynamic .. the sub menus will the made through Ajax.. have anybody tried it out?
Posted by Abdel on 01/11, 11:52 PM
I luv the menu. However, i'm facing problem when tried made it as database driven menu using PHP and Mysql, i manage to retrieve data for main menu, however, i failed to retrieve data for sub_menu. Any idea on how to do this.
Posted by michelle on 01/16, 04:59 AM
michelle - email me on ben AT unisupuk DOT com and ill show you hot to use recursive PHP to get all categories and sub categories from a mySQL database.

I wrote one to pull this menu, if you wanna see examples on it try:

unisupuk.selfip.com
unisupuk.selfip.com/slimcms

If anyone would like to know how to create these menues dynamically drop me an email and Ill try to help you!

Ben Duffin, Universal Support UK
Posted by Ben Duffin on 01/18, 08:55 AM
Is there a way to make the sub menus nested under the main ones and have them expand and contract as needed?
Posted by Michael on 01/26, 12:16 PM
What should I do, if I would like to use the vertical and the horizontal menu on the same page?
Posted by Robbie on 01/29, 06:08 AM
I could solw the problem, I had to rename "menuids".


Thanks
Posted by Robbie on 01/29, 06:55 AM
Great code, unfortunately only works if CSS code remains in <HEAD> of the HTML codes. If you use the CSS code as and in a external .css file, it creates a gap between the 'Menu' and 'Sub Menu' therefore it does not allow the users to select any options in the lower level of the menu.

If anyone has a solution, i would much appreciate the help.

thanks
Posted by Farhad Miah on 01/30, 09:38 AM

Comment Pages 8 of 25 pages « First  <  6 7 8 9 10 >  Last »

Name: (Required)

Email: (Required)

(NOT shown on page)

URL:

(Shown on page if entered)

Comments: (Required)

Supported BB codes: [b], [i], [u], [em], [strike], [strong], [pre], [code], and [blockquote].

Remember my personal information
Notify me of follow-up comments?

Submit the word you see below ("previewing" post does not require it):


Copyright 2006-2008 Dynamic Drive Read our Usage Terms before using any of the CSS codes.
Dynamic Drive DHTML and CSS Code Library