View Full Version : On hover, sub menus on CSS Vertical Menu "disappear" too quickly

07-07-2007, 01:42 AM
Newbie. Website: http://www.ivanarceneaux.info .
Using external CSS Vertical Menu script .css and .js . Mouseover main menu items reveals sub menus but the sub menus disappear before I can place the cursor on them to scroll/click. This was not happening with the default scripts, but I have made many experimental changes and am startin to get lost. I have pasted in the scripts, below. Please, dear experts, tell me I need to change here. Thank you, one and all.

.glossymenu, .glossymenu li ul{
list-style-type: none;
margin: 0;
padding: 0;
width: 185px; /*WIDTH OF MAIN MENU ITEMS*/
text-align: left;
border: 1px navy;

.glossymenu li{
position: relative;

.glossymenu li ul{ /*SUB MENU STYLE*/
position: absolute;
width: 300px; /*WIDTH OF SUB MENU ITEMS*/
left: 2px;
top: 0;
display: none;
text-align: left;

.glossymenu li a{
background: white url('glossybackblue4.gif') repeat-x bottom left;
color: navy;
display: block;
width: auto;
padding: 5px 0;
padding-left: 5px;
text-decoration: none; font-style:normal; font-variant:normal; font-weight:bold; font-size:10px; font-family:Verdana, Helvetica, sans-serif; padding-right:0; padding-top:5px; padding-bottom:5px

.glossymenu .arrowdiv{
position: absolute;
right: 2px;
background: transparent url('arrow.gif') no-repeat center right;

.glossymenu li a:visited, .glossymenu li a:active{
color: navy; url('glossybackblue4.gif');

.glossymenu li a:hover{
background-image: url('glossybackblue3h.gif');

/* Holly Hack for IE \*/
* html .glossymenu li { float: left; height: 1%; }
* html .glossymenu li a { height: 1%; }
/* End */

var menuids=new Array("verticalmenu") //Enter id(s) of UL menus, separated by commas
var submenuoffset=0 //Offset of submenus from main menu. Default is 0 pixels.

function createcssmenu(){
for (var i=0; i<menuids.length; i++){
var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
for (var t=0; t<ultags.length; t++){
var spanref=document.createElement("span")

if (window.addEventListener)
window.addEventListener("load", createcssmenu, false)
else if (window.attachEvent)
window.attachEvent("onload", createcssmenu)

07-07-2007, 02:40 PM
FYI: Impatient as I am, I have gone ahead and replaced my revised vertical menu mentioned in my original post with the original css vertical menu (and, even then, have already tweaked it) because I couldn't solve the problems I was encountering. Thank you, everyone, who has taken the time to look at my post.

07-08-2007, 08:22 AM
hi, i highly doubt javascript is necessary for this, you could probably find what you're looking for here : http://css.maxdesign.com.au/listamatic2/index.htm

sorry for not being able to help you any more, maybe some else with more experience could ;)

07-08-2007, 11:54 AM
You've helped me a lot just by responding to my query. Thank you. I'll look at the URL you posted. In the meantime, I have gone back to the original script on this vertical menu and am reworking my way back to the level I had it at before all the glitches sent in. Without taking a formal course in CSS and scriptwriting, my only option is to learn by trial-and-error (and I know I'm not the only one who learns all this stuff this way). Will repost a new thread at another time if I have a new way to ask my question. Thank you again.