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:
Rate this code:
Date Posted: 11/08/2006
Revision History: Updated Nov 8th, 06' to version 1.1
Usage Terms: Click here
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
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.
Many thanks
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.
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.
You've saved me from going completely mad.
document.getElementById(...) is null or not an object
any idea, please









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