With min-width and min-height you can set a minimum width and height for HTML elements, while max-width and max-height sets a maximum width and height. These values overrule the normal width and height.
This is the default test paragraph with width: 400px and height: 100px. The paragraphs below have the same style sheet, but each of them has a min/max declaration added.
Test paragraph with max-width: 100px
Test paragraph with min-width: 500px
Test paragraph with max-height: 50px, even though I put a lot of content in just to try to stretch it a tiny little bit (which, of course, doesn't work thanks to the Power of Standards).
Test paragraph with min-height: 250px
This one is for Explorer 6, where only min-height works only on table elements in a fixed table. This example does not work in Netscape 6.
TD without min-height |
TD with min-height: 500px |