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

    can anyone tell me what to change in the modxmenu.css for the MODxHost template to fix the cutting off long menu names in firefox?

    When a name of a submenu item is longer then 111px (=the top menu width), it get’s cut off. But in internet explorer it gets displayed correctly in a 172px wide submenu...

    The MODxHost template on www.modxhost.com doesn’t show this behaviour. I have compared the two CSS-files but to no avail.

    Any idea?

    Greetings,
    CoreBit
      • 18397
      • 3,250 Posts
      The template at modxhost.com and the one included in the distribution are quite different. You should be able to use the overflow CSS property to change the behavior.
        • 5798
        • 22 Posts
        Quote from: Mark at Mar 21, 2007, 04:08 AM

        You should be able to use the overflow CSS property to change the behavior.
        I tried already various overflow values for the submenu list entries (had to change the code in moo.fx.js). When overflow is set to "visible", the full menu gets displayed all the time. Other values than "hidden" make it even worse (then even the internet explorer displays the menu wrong).

        With the firefox plugin Firebug I found out, that the submenu items (i.e. the inner "li" elements) inherit their width (111px) from the outer li element (that one with the class "category"). These inner li elements contain the submenu links (i.e. anchor elements), which have their width set to 172px (in modxmenu.css):

        #ajaxmenu li li a, #ajaxmenu li.over li a {modxmenu.css (line 118)
        background-color:#000000;
        background-image:url(images/bullet_11x8.gif) !important;
        background-position:left center;
        background-repeat:no-repeat !important;
        border-bottom:1px solid #2F2F2F;
        border-left:1px solid #2F2F2F;
        border-right:1px solid #2F2F2F;
        color:#FFFFFF;
        font-weight:normal;
        opacity:0.7;
        text-align:left;
        text-indent:8pt;
        width:172px;
        }

        That property is interpreted by the internet explorer as it should be. For some reason firefox ignores the width property and cuts off the link names.

        After trying for hours I have no ideas what else to change, to get the submenu items displayed properly with firefox... does nobody noticed that problem before me???

        Greetings,
        CoreBit
          • 5798
          • 22 Posts
          #ajaxmenu ul li ul {
          	position: absolute;
          	left: 0; /* Set 1px less than menu width */
          	top:28px;
          	line-height: 16px;
          	width: 172px; /* new line */
          	}


          I just tested around a bit and set the width of some list elements explicitly in FireBug to see the changes immediately. The "new line" in the snipped above had to be added. That’s all.

          I hate CSS. >:(

          Greetings,
          CoreBit