We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36571
    • 145 Posts
    Is it possible to style a menu like this:

    item 1 item 2 item 3


    item 4 item 5 item 6


    item 7 ...and so on?


    These documents are all on the same level i.e. no subdocuments.

    Any help would be mightly appreciated.
      • 11975
      • 2,542 Posts
      Hi,

      you can easily build this menu using css and float property.

      For instance

      ul {
      width:240px;
      margin:0;
      padding:0;
      ....
      }

      li{
      float:left;
      margin:0;
      padding:0;
      width:80px;
      ...
      }


      :-)
        Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
        • 36571
        • 145 Posts
        By jove, you seem to be right.

        And there I was trying to work out some kind of clever Tpl-based way with the snippet call.

        Thanks for the help! laugh
          • 6726
          • 7,075 Posts
          Only thing with floats is that they don’t always behave consistently across browsers (at least, I have bad memories... or maybe my float skills are off lol).
          I tend to prefer using absolute positionning inside a relatively postionned element, works nice for me but it can’t be used for every need (works fine if your design is fixed width).
            .: COO - Commerce Guys - Community Driven Innovation :.


            MODx est l'outil id
            • 36571
            • 145 Posts
            In this case, it seems to work OK (tested in IE & FF). Although, like you say, it is within an object with static width. Don’t know how well it would work in other cases.

            Do you think it would be a good idea to include this as part of the Wayfinder examples documentation, or is it too obvious?
              • 25663 MODX Staff
              • 12,272 Posts
              Floats in that instance will behave perfectly indeed. You just have to watch your paddings and margins for IE. wink
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me