We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21112
    • 156 Posts
    This is doing my head in. I’ve been working on this for two days now, and have tried countless different style tutorials and solutions, but I simply cannot get the second level of my Wayfinder generated menu to display on hover. I’m not bad at CSS or HTML but this one has me completely confounded and I could really use some help! Whoever helps me to make this problem go away will be my hero laugh

    Here’s how things stand at the moment:

    This is the site under development: http://www.orionvisuals.com/wip/harryjenkins

    This is my Wayfinder call, as described at MuddyDogPaws: http://www.muddydogpaws.com/development/wayfinder/examples/example-2.html
    [[Wayfinder? &startId=`0` &level=`3` &parentClass=`hide` &parentRowTpl=`cssplay_parentRow` &outerTpl=`cssplay_outer` &innerTpl=`cssplay_inner` &rowTpl=`cssplay_row` &outerClass=`menu` &cssTpl=`cssplay_basicdd`]


    I’ve actually got an alternative style sheet for the site in IE loading, so I’ve put the code there. The stuff I’ve used for firefox has worked beautifully with the menu from day one. Here’s the latest css I’m using, taken from CSSPlay: http://www.cssplay.co.uk/menus/basic_dd.html

    /* ================================================================ 
    This copyright notice must be untouched at all times.
    
    The original version of this stylesheet and the associated (x)html
    is available at http://www.cssplay.co.uk/menus/basic_dd.html
    Copyright (c) 2005-2007 Stu Nicholls. All rights reserved.
    This stylesheet and the assocaited (x)html may be modified in any 
    way to fit your requirements.
    =================================================================== */
    /* remove the bullets, padding and margins from the lists */
    .menu ul{
    list-style-type:none;
    padding:0;
    margin:0;
    }
    /* make the top level links horizontal and position relative so that we can position the sub level */
    .menu li{
    float:left;
    position:relative;
    z-index:100;
    }
    
    /* use the table to position the dropdown list */
    .menu table{
    position:absolute;
    border-collapse:collapse;
    z-index:80;
    left:-1px;
    top:25px;
    }
    
    /* style all the links */
    .menu a, .menu :visited {
    display:block;
    font-size:13px;
    width:83px;
    padding:0;
    color:#000;
    background:none;
    text-decoration:none;
    margin-right:1px;
    text-align:center;
    }
    /* style the links hover */
    .menu :hover{
    color:green;
    }
    
    /* hide the sub level links */
    .menu ul ul {
    visibility:hidden;
    position:absolute;
    width:200px;
    height:0;
    }
    /* make the sub level visible on hover list or link */
    .menu ul li:hover ul,
    .menu ul a:hover ul{
    visibility:visible;
    }


    This is the "general" style sheet: http://www.orionvisuals.com/wip/harryjenkins/assets/css/hjmain.css
    This is the "ie6" style sheet: http://www.orionvisuals.com/wip/harryjenkins/assets/css/hjie.css

    The sooner I can get this solved, the sooner I can get rid of this headache I have from banging my head on the desk. :’( If any more information would help with the problem solving process, please let me know and I’ll provide it. Incidentally, the font scaling isn’t working properly yet either, but that’s another issue I’ve asked about in another thread.

    THANK YOU so much in advance to anyone able to help!
      • 8619
      • 229 Posts
      Have you tried playing around with a:active or a:focus? I remember reading something about IE and its quirky behavior with those, but not sure if it would help or not.

      When I get a chance in the next couple of days, I’ll try to look more into it...
        • 21112
        • 156 Posts
        Well, I fixed it, but I don’t know how... huh

        Basically I copied the example from the site onto my hdd and tried cutting and pasting bits and pieces between my site and the working example and eventually managed to get it going. Here’s some things that seemed to have an effect:

        - changed the doc type definition to match the one in the example site
        - used class= instead of id= to reference the block with the menu list
        - the sub-section dropdown can’t be any wider than the top level item (in msie6 only)
        - bizarrely, in one place if I used a 6 chara hex code for a background colour it didn’t work, but the 3 character shorthand (eg #fff) did... *shrug*

        I can’t give any specific advice to anyone who is experiencing a similar problem, except to take a "process of elimination" approach to compare the working example code and your own.
          • 33372
          • 1,611 Posts
          The doctype definition makes total sense to me. Using an XHTML doctype will usually force IE6 into standards mode, but most others will let it slide into "quirks" mode. IE6 also had very limited :hover abilities, among other things.

          Question: Did you try any of the included Wayfinder menu templates? There are several CSS Play menus, including one that seems to be the same as what you’re using. You can load those automatically as configs, and the CSS files are also included in the examples folder.
            "Things are not what they appear to be; nor are they otherwise." - Buddha

            "Well, gee, Buddha - that wasn't very helpful..." - ZAP

            Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
            • 19341
            • 4 Posts
            I am having the same problem. I’d hoped to find a fix on this thread, but no such luck.

            I went to your site and it isn’t working in ie7. Is the above url correct for that site?
              • 12679
              • 5 Posts
              I just fixed this and got it to where I can do 6 levels on IE6. There are a number of things you need to make sure you do. But one of the key things is you must *not* use "overflow:hidden" (which is in the dropdown.css provided with WayFinder - and of course that means the dropdown menu in the MODx release is broken under IE6). If you have that enabled, you will not be able to expand the menu at all. In IE6, you have to use the "visibility" option in the correct places to make it work.

              Below are the contents of the two CSS files I have - one is the main that is included for all browsers and the other is only included for <= IE6 (IE7 works fine with just the main CSS). There are other ways of structuring a multilevel dropdown than this, but given how WayFinder works, I needed to stay within its confines.

              I hope this helps!

              This is how I include the two CSS files which follow below:

              <link rel="stylesheet" media="all" type="text/css" href="assets/templates/mytemplate/css/dropdown.css" />
              <!--[if lte IE 6]>
              <link rel="stylesheet" media="all" type="text/css" href="assets/templates/mytemplate/css/dropdown_ie.css" />
              <![endif]-->

              First, the main CSS ("dropdown.css"):

              /*
              .menu {font-family: arial, sans-serif; width:960px; position:relative; margin:0; font-size:11px; margin:2px 0px 0px 0px; z-index:100;}
              .menu ul li a, .menu ul li a:visited {display:block; text-decoration:none; color:#000; width:104px; height:20px; text-align:center; color:#fff; border:1px solid #fff; background:#710069; line-height:20px; overflow:hidden;}
              */

              .menu {font-family: cursive, sans-serif; font-size:10px; z-index:100; margin-left:2px;}
              .menu ul li a, .menu ul li a:visited {display:block; text-decoration:none; color:#000; padding-left:3px; padding-right:3px; width:105px; height:21px; text-align:center; color:#000; border:1px solid #fff; background:#5f9ea0; line-height:20px;}

              .menu ul {padding:0; margin:0;list-style-type: none; }
              .menu ul li {float:left; margin-right:1px; position:relative;}
              .menu ul li ul {display: none;}

              /* specific to non IE browsers */
              /* Top Level - Hover */
              .menu ul li:hover a {color:#953; background:#f5deb3;}
              .menu ul li:hover ul {display:block; position:absolute; top:22px; left:0; width:105px;}

              /* Pull down - second level */
              .menu ul li:hover ul li a.hide {background:#5f9ea0; color:#000;}
              .menu ul li:hover ul li:hover a.hide {background:#f5deb3; color:#953;}
              .menu ul li:hover ul li ul {display: none;}
              .menu ul li:hover ul li a {display:block; background:#5f9ea0; color:#fff;}
              .menu ul li:hover ul li a:hover {background:#f5deb3; color:#953;}
              .menu ul li:hover ul li:hover ul {display:block; position:absolute; left:112px; top:0;}
              .menu ul li:hover ul li:hover ul.left {left:-112px;}

              /* Pull down - Third level */
              .menu ul li:hover ul li:hover ul li a.hide {background:#5f9ea0; color:#000;}
              .menu ul li:hover ul li:hover ul li:hover a.hide {background:#f5deb3; color:#953;}
              .menu ul li:hover ul li:hover ul li ul {display: none;}
              .menu ul li:hover ul li:hover ul li a {display:block; background:#5f9ea0; color:#fff;}
              .menu ul li:hover ul li:hover ul li a:hover {background:#f5deb3; color:#953;}
              .menu ul li:hover ul li:hover ul li:hover ul {display:block; position:absolute; left:112px; top:0;}
              .menu ul li:hover ul li:hover ul li:hover ul.left {left:-112px;}

              /* Pull down - Fourth level */
              .menu ul li:hover ul li:hover ul li:hover ul li a.hide {background:#5f9ea0; color:#000;}
              .menu ul li:hover ul li:hover ul li:hover ul li:hover a.hide {background:#f5deb3; color:#953;}
              .menu ul li:hover ul li:hover ul li:hover ul li ul {display: none;}
              .menu ul li:hover ul li:hover ul li:hover ul li a {display:block; background:#5f9ea0; color:#fff;}
              .menu ul li:hover ul li:hover ul li:hover ul li a:hover {background:#f5deb3; color:#953;}
              .menu ul li:hover ul li:hover ul li:hover ul li:hover ul {display:block; position:absolute; left:112px; top:0;}
              .menu ul li:hover ul li:hover ul li:hover ul li:hover ul.left {left:-112px;}

              /* Pull down - Fifth level */
              .menu ul li:hover ul li:hover ul li:hover ul li:hover ul li a.hide {background:#5f9ea0; color:#000;}
              .menu ul li:hover ul li:hover ul li:hover ul li:hover ul li:hover a.hide {background:#f5deb3; color:#953;}
              .menu ul li:hover ul li:hover ul li:hover ul li:hover ul li ul {display: none;}
              .menu ul li:hover ul li:hover ul li:hover ul li:hover ul li a {display:block; background:#5f9ea0; color:#fff;}
              .menu ul li:hover ul li:hover ul li:hover ul li:hover ul li a:hover {background:#f5deb3; color:#953;}
              .menu ul li:hover ul li:hover ul li:hover ul li:hover ul li:hover ul {display:block; position:absolute; left:112px; top:0;}
              .menu ul li:hover ul li:hover ul li:hover ul li:hover ul li:hover ul.left {left:-112px;}

              Next, my IE 5/6 -specific CSS ("dropdown_ie.css"):

              table {border-collapse:collapse; border:0; margin:0; padding:0;}

              .menu ul li a.hide, .menu ul li a:visited.hide {display:none;}
              .menu ul li a:hover ul li a.hide {display:none;}

              /* Top (1st) level hover color */
              .menu ul li a:hover {color:#953; background:#f5deb3;}

              /* Drop down from top level */
              .menu ul li a:hover ul {display:block; position:absolute; top:22px; left:0px; width:105px;}

              /* 2nd level color for items which have children */
              .menu ul li a:hover ul li a.sub {background:#5f9ea0; color:#000;}

              /* 2nd level color for items which do not have children */
              .menu ul li a:hover ul li a {display:block; background:#5f9ea0; color:#fff;}

              /* Keep 2nd level items from expanding */
              .menu ul li a:hover ul li a ul {visibility:hidden;}

              /* 2nd level hover color */
              .menu ul li a:hover ul li a:hover {background:#f5deb3; color:#953;}

              /* 2nd level expand */
              .menu ul li a:hover ul li a:hover ul {visibility:visible;display:block; position:absolute; left:112px; top:0;}
              .menu ul li a:hover ul li a:hover ul li a {display:block; width:105px;}

              /* 3rd level keep duplicates from showing */
              .menu ul li a:hover ul li a:hover ul li a.hide {visibility:hidden; display:none;}

              /* 3rd level color for items which have children */
              .menu ul li a:hover ul li a:hover ul li a.sub {background:#5f9ea0; color:#000;}

              /* 3rd level color for items which do not have children */
              .menu ul li a:hover ul li a:hover ul li a {display:block; background:#5f9ea0; color:#fff; width:105px;}

              /* Keep 3rd level items from expanding */
              .menu ul li a:hover ul li a:hover ul li a ul {visibility:hidden;}

              /* 3rd level hover color */
              .menu ul li a:hover ul li a:hover ul li a:hover {background:#f5deb3; color:#953;}

              /* 3rd level expand */
              .menu ul li a:hover ul li a:hover ul li a:hover ul {visibility:visible; display:block; position:absolute; left:112px; top:0;}
              .menu ul li a:hover ul li a:hover ul li a:hover ul li a {display:block; width:105px;}

              /* 4th level keep duplicates from showing */
              .menu ul li a:hover ul li a:hover ul li a:hover ul li a.hide {visibility:hidden; display:none;}

              /* 4th level color for items which have children */
              .menu ul li a:hover ul li a:hover ul li a:hover ul li a.sub {background:#5f9ea0; color:#000;}

              /* 4th level color for items which do not have children */
              .menu ul li a:hover ul li a:hover ul li a:hover ul li a {display:block; background:#5f9ea0; color:#fff; width:105px;}

              /* Keep 4th level items from expanding */
              .menu ul li a:hover ul li a:hover ul li a:hover ul li a ul {visibility:hidden;}

              /* 4th level hover color */
              .menu ul li a:hover ul li a:hover ul li a:hover ul li a:hover {background:#f5deb3; color:#953;}

              /* 4th level expand */
              .menu ul li a:hover ul li a:hover ul li a:hover ul li a:hover ul {visibility:visible; display:block; position:absolute; left:112px; top:0;}
              .menu ul li a:hover ul li a:hover ul li a:hover ul li a:hover ul li a {display:block; width:105px;}

              /* 5th level keep duplicates from showing */
              .menu ul li a:hover ul li a:hover ul li a:hover ul li a:hover ul li a.hide {visibility:hidden; display:none;}

              /* 5th level color for items which have children */
              .menu ul li a:hover ul li a:hover ul li a:hover ul li a:hover ul li a.sub {background:#5f9ea0; color:#000;}

              /* 5th level color for items which do not have children */
              .menu ul li a:hover ul li a:hover ul li a:hover ul li a:hover ul li a {display:block; background:#5f9ea0; color:#fff; width:105px;}

              /* Keep 5th level items from expanding */
              .menu ul li a:hover ul li a:hover ul li a:hover ul li a:hover ul li a ul {visibility:hidden;}

              /* 5th level hover color */
              .menu ul li a:hover ul li a:hover ul li a:hover ul li a:hover ul li a:hover {background:#f5deb3; color:#953;}

              /* 5th level expand */
              .menu ul li a:hover ul li a:hover ul li a:hover ul li a:hover ul li a:hover ul {visibility:visible; display:block; position:absolute; left:112px; top:0;}
              .menu ul li a:hover ul li a:hover ul li a:hover ul li a:hover ul li a:hover ul li a {display:block; width:105px;}
                • 28436
                • 242 Posts
                Hi,

                i am not sure, but maybe its possible to clear your css with the wayfinders "&levelClass" Parameter.

                you can find it here http://wiki.modxcms.com/index.php/Wayfinder#CSS_Class_Name_Parameters

                like this

                /* Pull down - Fifth level */
                .menu ul li.level5:hover ul.left {left:-112px;}


                no idea, did you tried it?

                ciao, Stefan
                  • 11206
                  • 73 Posts
                  i got this working by making sure the doctype was the same as in the example works in ie7
                    • 2328
                    • 39 Posts
                    Looks like I’m a bit late to help with the specific issue, but flyouts/dropdowns never work straight off with IE6. This is because it only supports the :hover pseudo-class on <a> tags and most of these structures put the hover on the <li> tag (as in ifthenelse’s example).

                    MODx actually comes with a solution to the problem, but then doesn’t tell you about it. If you look in your /assets/js folder, you’ll find a file called csshover.htc. There’s an explanation in the accompanying readme file.

                    Add this to your Ie-specific CSS file:

                    body {
                    behavior: url(/assets/js/csshover.htc);
                    }

                    and it should do the trick.

                    Also, ALWAYS make sure you set the DOCTYPE correctly at the top of the page - without it, IE6 will drop into "quirks" mode and will do very little the same way as other browsers. The most glaring example is usually the "box model" - CSS width declarations will include the border and padding while in quirks, and exclude them in standards mode (which is correct behaviour).