We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 35176
    • 193 Posts
    Hi

    This is weird. I’m porting a site into MODx Revo from here:
    http://www.bayviewfootprints.org/index-current.php

    to here:
    http://silverlake.flexihostings.net/~bayviewf/modx2/

    the visibility: hidden part of my css works in the original site, but not on MODx.

    Exact same css file for both:
    http://silverlake.flexihostings.net/~bayviewf/modx2/assets/css/menu.css

    Some of the css works fine. But when inspected in Chrome Developer tool, visibility is not there.

    Where did it go???

    Thanks,
    johny
      jealousy<>love
      • 33997
      • 150 Posts
      That was a doozy....had me baffled for a bit there, but I think I found your problem. Get rid of the class ’mymenu’ from each UL, and wrap them all with a div that is class mymenu, and that should take care of your issue. Alternatively, change the 2 CSS selectors:
      /**Change**/
      .myMenu ul ul
      /**To**/
      ul.myMenu ul
      /**and Change**/
      .myMenu ul li:hover ul, .myMenu ul a:hover ul
      /**to**/
      ul.myMenu li:hover ul, ul.myMenu a:hover ul
      


      Checked it out in CSSEdit, it works. Enjoy!
        "Great spirits have always encountered violent opposition from mediocre minds." -Albert Einstein
        • 35176
        • 193 Posts
        ok, let me try to understand:
        /**Change**/
        .myMenu ul ul

        means any ul under any ul under any .myMenu class

        /**To**/
        ul.myMenu ul

        any ul under any ul of class myMenu

        /**and Change**/
        .myMenu ul li:hover ul, .myMenu ul a:hover ul
        /**to**/
        ul.myMenu li:hover ul, ul.myMenu a:hover ul

        is basically the same idea-- more specificity.

        But not just more specific, but your version removes one layer from the hierarchy. Ie, the original version looks for a grandchild ul under myMenu, yours looks for a child ul under myMenu. Meaning, the original is deeper than the html-- there is no grandchild ul under the top ul.

        so why would it work on the other site? Oh, i see! On the old site, myMenu is a div surrounding the ul’s, but in the modx site, myMenu is the top ul.

        YOU’RE AWESOME!
          jealousy<>love
          • 35176
          • 193 Posts
          Get rid of the class ’mymenu’ from each UL
          if i understand you, that’s not the case, there’s only one tag of class myMenu, in both versions-- the outer parent tag.
            jealousy<>love
            • 33997
            • 150 Posts
            Quote from: johnywhy at May 03, 2011, 09:48 PM

            Get rid of the class ’mymenu’ from each UL
            if i understand you, that’s not the case, there’s only one tag of class myMenu, in both versions-- the outer parent tag.
            You are right. I missed that. What I was saying is you can solve your problem one of two ways. You can strip the class name from the UL and surround the whole menu with the class name, or you can edit the CSS to reflect the changes you’ve made to the HTML. Either way works. I see you got it fixed already; happy to help.
              "Great spirits have always encountered violent opposition from mediocre minds." -Albert Einstein