...

View Full Version : css menu....help???



Rachy06
07-21-2007, 07:33 PM
hi... i have used the following code to create a menu in css, and obviously used the appropriate html to create the links. I was wondering if there is anyway i can create a time delay so that the menu doesn't automatically disappear on mouseout? would i have to use javascript?

* CSS Popout menuv */
/* Fix IE. Hide from IE Mac \*/
* html #menuv ul li{float:left;height:1%;}
* html #menuv ul li a{height:1%;}
/* End */
#menuv /* position, size, and font of menu */
{

width: 150px; /* [1] width of menu item (i.e., box) */
text-align: center;
font-size: 10pt;
font-family: helvetica, arial, geneva, sans-serif;
}
#menuv a
{
width: 120px;
display:block;
padding-top: 0.2em; /* expands menu box vertically*/
padding-bottom: 0.2em;
border-bottom:1px solid #555; /* adds bottom border */
white-space:nowrap;
delay: 0.90;
}
#menuv a, #menuv a:visited /* all menus at rest */
{
color: white;
background: url(./normal.jpg);
text-decoration:none; /* removes underlines from links */
}
#menuv a:hover /* all menus on mouse-over */
{
color: black;
background: url(./mouseover.jpg);
}

#menuv li
{
list-style-type:none; /* removes bullets */
}
#menuv ul li
{
position:relative;
}
#menuv li ul
{
position: absolute;
top: 0;
left: 120px; /* distance from left menu (this should be the same as width value in #menuv [1]) above */
display: none;
}
div#menuv ul, #menuv ul ul, div#menuv ul ul ul
{
margin:0; /* keeps the menu parts together */
padding:2px;
width: 120px; /* width of sub menus (this should be the same as width value in #menuv [1]) above */
}
div#menuv ul ul, div#menuv ul ul ul, div#menuv ul li:hover ul ul, div#menuv ul li:hover ul ul ul
{
display: none;
}
div#menuv ul li:hover ul, div#menuv ul ul li:hover ul, div#menuv ul ul ul li:hover ul
{
display: block;
}

BWiz
07-21-2007, 08:10 PM
I wasn't aware of the fact that there was a CSS property dubbed "delay". I'm pretty sure you do need javascript for this.

Rachy06
07-21-2007, 08:32 PM
yeh i know you need javascript, i was messing around.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum