May 2003
Intermediate to advanced
480 pages
10h 9m
English
Instead of setting a fixed height, it is sometimes useful to set limits on the height of an element. These two properties let you set a maximum and/or minimum height. The height of the element is calculated normally, and then these limits are applied.
Remember to set the overflow property to hidden (or another appropriate value) if you set a max-height; otherwise, the content will overflow the specified height, even if the element does not.
Inherited: No
See also: Section B.45height, Section B.68max-width, Section B.68min-width
A CSS length (px, pt, em, etc.), a percentage of the parent element's content area height, or (in the case of max-height only) none.
Initial value:
max-height: none
min-height ...
Read now
Unlock full access