We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2901
    • 277 Posts
    Hi all
    I have a strange proplem with IE7 on this site
    http://www.francinejordi.ch/Fanbereich
    It ignores my min-height.
    the CSS is following
    div#cLeft {
    	min-height: 500px;
    	height: auto !important;
    	height: 530px; /*ie hack for min height*/
    }
    

    Does anyone now this problem? I was sure IE7 would support min-height or at least the IE hack.

    Thanks in advance


      • 25663 MODX Staff
      • 12,272 Posts
      IE7 will likely take the 530px value. Also just for reference, you can omit the "div" from your rule since by definition IDs can only be located once on a page.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 2901
        • 277 Posts
        Hi Ryan
        thanks for your answer. Well I removed the "div" from the statement but IE7 still is not taking the 530px height into account I don’t know why.
          • 25663 MODX Staff
          • 12,272 Posts
          Is it taking the 500px into account? I don’t recall off the top of my head whether or not IE7 supports min-height... I tend to think it does now that I think about it. IE6 and below definitely does not and your CSS would feed an effective min-height of 530px to it.

          You may just need to buckle down and use a Conditional Comment to feed the intended height to IE7.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 2901
            • 277 Posts
            I guess this could be the solution. IE 6 is properly working IE7 doesen’t consider to take any height at all.
              • 2901
              • 277 Posts
              a conditional stylesheet did the trick, but not on the same div. Don’t ask me why does not really make sense to me.
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Wouldn’t the height: auto override the other height directives in browsers that understand the !important declaration?
                  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
                  • 2901
                  • 277 Posts
                  as far as I know, auto overwrites the given height for IE in the height element
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    I think you should have the !important in the min-height rule. If I recall correctly, that will make it override the following height: auto statement, except in IE6 which doesn’t recognize the !important declaration, so in IE6 the auto will be used.
                      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
                      • 25663 MODX Staff
                      • 12,272 Posts
                      IE6 does recognize !important, just not for when there are two rules within the same selector. Handy eh?
                        Ryan Thrash, MODX Co-Founder
                        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me