Here's an explanation from the W3C ( link ):
The following algorithm describes how the two [min-height and max-height] properties affect the used value of the height property:
The estimated usable height is calculated (without "min-height" and "max-height"), following the rules in the "Computing Height and Margins" section above.
If this preliminary height is greater than "max-height", the above rules apply again, but this time use the value of "max-height" as the calculated value for "height".
If the resulting height is less than "min-height", the above rules apply again, but this time using the value of "min-height" as the calculated value for "height".
To summarize: In principle, if the minimum height is greater than the height otherwise (whether explicit height is specified or not), then the minimum height is used as the height. If the minimum height is less than the height otherwise, the minimum height has no effect .
For the specific case that you are specifying, indicating height:100% makes the element's height equal to the height of the containing block. (However, this could potentially be undone, for example, if you also specified max-height:50% .) Specifying min-height:100% means that if the calculated height is less than 100%, in fact, even if you explicitly specified a height of less than 100%, this is processed as if you said height:100% . Please note that one key difference is that the maximum height can exceed the height, but cannot cancel the minimum height (since the maximum height is taken into account after the height, but to the minimum height in accordance with the W3C recommendation, as described above).
Tim Goodman Feb 26 '10 at 13:34 2010-02-26 13:34
source share