Box Properties
The Ultimate CSS Reference 190
min-height
min-height: { length | percentage | inherit } ;
This property sets the minimum content
height of a block or a replaced element
(p. 175). This minimum height doesn??™t
include padding, borders, or
margins??”see The CSS Box Model
(p. 142).
An element to which min-height is
applied will never be smaller than the
minimum height specified, but will be
allowed to grow normally if the content
exceeds the minimum height set.
Example
This style rule assigns a minimum height
of 100 pixels to paragraphs within the
element with ID "example":
#example p {
min-height: 100px;
}
min-height is usually used to ensure that an element has at least a minimum height
even if no content is present; it??™s also commonly used in conjunction with
max-height to produce a height range for the element concerned.
SPEC
version initial inherited
CSS2 0 NO
BROWSER SUPPORT
Op9.2+ Saf2+ FF1+ IE7+
FULL FULL FULL FULL
Combining min-height and height
Note that min-height and height shouldn??™t be applied to the same element using
the same unit, as this will cause one to override the other.
Pages:
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290