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

    I have done a template with a multilevel menu enclosed in in a div="menu" tag. When the menu gets on a new line the div is suppose to growth and fit the content - but it dosen’t! The consequeses is that the id="content" doesn’t float correctly and the menu laps over the content area.

    I have used all day to find out why, but havent found the reason yet. I really really hope someone can help me before I loose my mind.

    The site is here: http://11design.dk/sydbank/index.php?id=14

    try and navigate: Sydbank --> Profil --> Grundelementer --> Logo

    As you can see the content dosen’t float down as it is suppose to.

    Thanks

    Kamp
      • 4749
      • 623 Posts
      It might be worth a try to actually specify height:auto; in the #menu. I noticed that it’s blank... Nothing there.
        The MODx has you...
        Utah Web Design
        • 15320
        • 22 Posts
        I am affraid this is not the problem :’(
        The #menu doesn’t addapt to the size of the menu. I really have no clue why???
        Please help someone if you have a suggestion!!!
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          When you have a container with floated elements inside of it, the container does not stretch to the size of its contents. If you put a clearing element after the last element inside the container, just before the closing tag of the container, it will cause it to stretch. Or if you float the container it will stretch.

          A good way to see what’s happening is to give your container a background color. Then you can see if it’s stretching or not.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 15320
            • 22 Posts
            I have tried this allready, but with no luck I am affraid.

            Do you have any other suggestions?

            Thanks
              • 4749
              • 623 Posts
              If #menu is floated then the clearer div needs to be just before the closing, but if sk_menu is floated then the clearer div needs to be just before the closing div.

              Right now it looks like this:
              <div id="menu">
                  <div class="sk_menu">
                  ....lists
                  </div>
              <div class="clearDiv"> </div>
              </div>
              


              It should look like this:
              <div id="menu">
                  <div class="sk_menu">
                  ....lists
              <div class="clearDiv"> </div>
                  </div>
              
              </div>
              

                The MODx has you...
                Utah Web Design