{"id":14071,"date":"2011-09-05T20:49:38","date_gmt":"2011-09-06T03:49:38","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=14071"},"modified":"2021-05-26T07:13:20","modified_gmt":"2021-05-26T14:13:20","slug":"min-height","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/m\/min-height\/","title":{"rendered":"min-height"},"content":{"rendered":"\n

The min-height<\/code> property in CSS<\/abbr> is used to set the minimum height<\/b> of a specified element. The min-height<\/code> property always overrides both height<\/code> and max-height<\/code>. Authors may use any of the length values<\/a> as long as they are a positive value.<\/p>\n\n\n\n

.wrapper {\n  height: 100%;     \/* full height of the content box *\/\n  min-height: 20em; \/* Will be AT LEAST 20em tall *\/\n}\n\n.wrapper {\n  height: 600px;\n  min-height: 400px; \/* Will be AT LEAST 400px tall : overrides height *\/\n}\n\n.wrapper {\n  min-height: 400px; \/* overrides height and max-height *\/\n  height: 200px;\n  max-height: 300px;\n}<\/code><\/pre>\n\n\n\n