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 21 of 28 pages « First < 19 20 21 22 23 > Last »
Thanks in advance!
Ken
thanks
I wonder if somebody could offer a solution for this.
I try to rename the css an js files for the second menu, the name for ids and classes also.
The missbehavior is always the same. While the first submenus are shown correct, the second one isn't.
This code is so usefull, that it's worth to be used twice ;-)
Maybe someone cold offer an idea?
Everything functions properly with IE6 and FF2.0, however, in IE7 the submenu disappears when you try to hover over the menu items. It will not allow a smooth scroll over the items. I've tried everything that I could think of. The css and javascript are in external files. Please help.....
/*-------Main Navigation CSS-------*/
#left_navbox
{
background-color: #5C0401;
width: 174px;
float: left;
height: 730px;
border-right: #fecb00 1px solid;
border-left: #fecb00 1px solid;
border-bottom: #fecb00 1px solid;
border-top: #fecb00 1px solid;
}
/*start of nav list*/
.navdiv ul
{
margin: 0px 7px;
padding: 0;
list-style-type: none;
font-weight: bold;
text-decoration: none;
width: 160px;/* Width of Menu Items */
position: absolute;
top: 179px;
}
/*First tier item box*/
.navdiv ul li
{
position: relative;
margin-top: 5px;
margin-bottom: 5px;
background-color: #470001;
}
/*Sub level menu nav */
.navdiv ul li ul
{
position: absolute;
width: 160px;
top: 0;
visibility: hidden;
margin-left:0;
}
/*sub level item boxes*/
.navdiv ul li ul li
{
position: relative;
margin-top: 0px;
margin-bottom: 0px;
visibility:visible;
}
/* First tier link styles */
.navdiv ul li a
{
display: block;
overflow: auto; /*force hasLayout in IE7 */
color: black;
text-decoration: none;
font-size: 16px;
color: #ffcc00;
font-family: Garamond;
font-weight: bold;
padding-left: 8px;
padding-bottom:10px;
padding-top:10px;
}
/*Submenu link styles*/
.navdiv ul li ul li a
{
display: block;
overflow: auto;
color: black;
text-decoration: none;
font-size: 16px;
color: #ffcc00;
font-family: Garamond;
padding-left: 8px;
font-weight: normal;
padding-bottom: 10px;
padding-top: 10px;
margin: 0px;
}
.navdiv ul li a:visited
{
color: #fecb00;
font-weight: bold;
font-size: 16px;
font-family: Garamond;
background-color: #470001;
text-decoration: none;
padding-left: 8px;
padding-bottom: 10px;
padding-top: 10px;
}
.navdiv ul li a:hover
{
color: black;
text-decoration: none;
font-size: 16px;
color: #530002;
font-family: Garamond;
font-weight: bold;
padding-left: 8px;
padding-bottom: 10px;
padding-top: 10px;
background-color: #fecb00;
}
.navdiv ul li ul li a:visited
{
color: #fecb00;
font-weight: normal;
font-size: 16px;
font-family: Garamond;
background-color: #470001;
text-decoration: none;
padding-left: 8px;
padding-bottom: 10px;
padding-top: 10px;
}
.navdiv ul li ul li a:hover
{
background-color: #ffcc00;
font-size: 16px;
color: #530002;
font-family: Garamond;
text-decoration: none;
display: block;
font-weight: normal;
}
/* Holly Hack for IE \*/
* html .navdiv ul li { float: left; height: 1%; }
* html .navdiv ul li a { height: 1%; }
/* End */
/*----Main Navigation CSS End--------*/
<!----HTML CODE Developed in VS 2005 as ASP.Net---->
<div id="left_navbox">
<div class="navdiv">
<ul id="nav">
<li>Home</li>
<li>Academics
<ul>
<li>English</li>
<li>Math</li>
<li>Science</li>
<li>Social Studies</li>
<li>P.E. / ROTC</li>
<li>Foreign Language</li>
<li>Electives</li>
<li>CTE</li>
<li>Media Center</li>
</ul>
</li>
<li>Athletics</li>
<li>Calendar of Events</li>
<li>Clubs</li>
<li>Contact Us
<ul>
<li>Administration</li>
<li>Athletics</li>
<li>Attendance</li>
<li>Discipline</li>
<li>Faculty</li>
<li>Guidance</li>
<li>Nurse</li>
<li>University High</li>
</ul>
</li>
<li>Guidance</li>
<li>Registration</li>
<li>District Home</li>
</ul>
</div><!---Close .navdiv--->
</div><!---Close left_navbox--->
when i use the menu with <select> or textbox. the menu is overlapping. is there is any solution or patch code to fix this issue.
regards
ganesh
Im working on a horisontal menu, but I want it to be dynamic - in adding items and removing items to and from the menu. Does anyone have an idea on how to develop this kind of menu. Preferably without a database.
Maybe via a Administrative page of some sort. This will be used in SharePoint 3.0.
Best Regards
Snakeeye
Comment Pages 21 of 28 pages « First < 19 20 21 22 23 > Last »
Commenting is not available in this weblog entry.





