Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    On hover, sub menus on CSS Vertical Menu "disappear" too quickly

    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.

    cssverticalmenu.css:
    .glossymenu, .glossymenu li ul{
    list-style-type: none;
    margin: 0;
    padding: 0;
    width: 185px; /*WIDTH OF MAIN MENU ITEMS*/
    text-align: left;
    padding-left:2px;
    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;
    filter:alpha(opacity=100);
    -moz-opacity:1;
    }


    .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 */


    cssverticalmenu.js:
    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")
    spanref.className="arrowdiv"
    spanref.innerHTML="&nbsp;&nbsp;"
    ultags[t].parentNode.getElementsByTagName("a")[0].appendChild(spanref)
    ultags[t].parentNode.onmouseover=function(){
    this.getElementsByTagName("ul")[0].style.left=this.parentNode.offsetWidth+submenuoffset+"px"
    this.getElementsByTagName("ul")[0].style.display="block"
    }
    ultags[t].parentNode.onmouseout=function(){
    this.getElementsByTagName("ul")[0].style.display="none"
    }
    }
    }
    }


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

  • #2
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Updating my post

    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.

  • #3
    New Coder
    Join Date
    Jun 2007
    Location
    Quebec, Canada
    Posts
    64
    Thanks
    4
    Thanked 3 Times in 3 Posts
    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

  • #4
    New to the CF scene
    Join Date
    Jun 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •