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 25 of 25 pages « First  <  23 24 25

Rox

I copied your code and altered it as I explained and it worked fine.

I emailed the source code over to you. If you didnt receive it let me know and I'll resend it.

Dave
Posted by Dave on 09/06, 10:04 AM
Chris:

According to the way I have the script set up, the structure should be:

<div class="suckerdiv">
<ul id="suckertree1">
<li>Item 1</li>
<li>Item 2</li>
<li>Folder 1
<ul>
<li>Folder 1.1</li>
<ul>
<li>Sub Item 1.1.1</li>
<li>Sub Item 1.1.2</li>
<li>Sub Item 1.1.3</li>
</ul>
<li>Folder 1.2</li>
<ul>
<li>Sub Item 1.2.1</li>
<li>Sub Item 1.2.2</li>
<li>Sub Item 1.2.3</li>
</ul>
</ul>
</li>
<li>Item 3</li>
<li>Folder 2
<ul>
<li>Sub Item 2.1</li>
<li>Folder 2.1
<ul>
<li>Sub Item 2.1.1</li>
<li>Sub Item 2.1.2</li>
<li>Sub Item 2.1.3</li>
<li>Sub Item 2.1.4</li>
<li>Sub Item 2.1.5</li>
<li>Sub Item 2.1.6</li>
</ul>
</li>
</ul>
</li>
<li>Item 4</li>
</ul>
</div>


When a parent item has a sub-menu, the new menu's <ul> tag is contained within the parent item's <li> tag.
Posted by Alex on 09/08, 05:20 PM
Hi,... I've found that this menu is very cool. But, can we make every level of sublevel is having different setting - like width, position, background... etc.

Many thanks
Posted by Puji on 09/14, 07:12 PM
Hi,
I am still having an issue on IE 7, if the sub-menu has more than 2 items then the menu disappears when I move the mouse over the 3rd item.

It works fine in FF.

Was this issue that was fixed recently? Can someone please show me the fix?

Thank you.
Posted by Jehan on 09/17, 12:04 PM
Stephen,
I think you were having the same problem as me. For some reason, the sub-menu just disappears as you are moving over it. This only happens in IE.

I think if there is a link behind the menu, I think that is when the problem occurs.

Any suggestions.
Posted by Jehan on 09/17, 12:25 PM
THANK YOU for this. I've been all over the place looking for a vertical dropdown that doesn't cause huge problems with IE.

You've saved me from going completely mad.
Posted by LittleKat on 09/21, 10:38 PM
How could one integrate this menu in a blueprint css grid?
Posted by Bart on 09/29, 06:37 AM
This is so.. greate..... I m Happy? .......wow
Posted by Usman Ali on 11/14, 05:41 AM
thats really greate... i m happy!
Posted by Usman Ali on 11/14, 05:41 AM
in IE6, I got an error:

document.getElementById(...) is null or not an object

any idea, please
Posted by Babs on 11/15, 02:26 AM

Comment Pages 25 of 25 pages « First  <  23 24 25

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