Comments on: min-height https://css-tricks.com Tips, Tricks, and Techniques on using Cascading Style Sheets. Wed, 26 May 2021 14:16:57 +0000 hourly 1 https://wordpress.org/?v=6.2.2 By: Geoff Graham https://css-tricks.com/almanac/properties/m/min-height/#comment-1772879 Wed, 26 May 2021 14:16:57 +0000 http://css-tricks.com/?page_id=14071#comment-1772879 In reply to David.

Hey David! There’s no additional benefit when the values are specified in pixels — just one example in the set to show that different length units are accepted. If the design calls for a fixed height between 400px and 600px, then that would be a good case for using them. But you’ll likely see relative or percentage units for their flexibility in responsive designs (among other things).

Oh, and thanks for the heads up on that typo in the code comment!

]]>
By: David https://css-tricks.com/almanac/properties/m/min-height/#comment-1772801 Wed, 26 May 2021 07:39:47 +0000 http://css-tricks.com/?page_id=14071#comment-1772801 Hey Sara,

in your first code example you have:

.wrapper {
height: 600px;
min-height: 400px; /* Will be AT LEAST 20em tall : overrides height */
}

What is the benefit for height and min-height specified in px? And why does the comment behind min-height says something about em?

]]>
By: Luke https://css-tricks.com/almanac/properties/m/min-height/#comment-1752674 Wed, 20 Nov 2019 14:11:26 +0000 http://css-tricks.com/?page_id=14071#comment-1752674 Great article,

I just wanted to check if you have you ever experienced an issue with using “vh” as your min-height value. I had an attribute set to “min-height: 100vh” and it was ignoring the min-height attribute, but if I use a pixel value it works.

I ended up using display: flex and it seemed to have worked, do you have any experience with this?

Luke

]]>
By: Martin Potokar https://css-tricks.com/almanac/properties/m/min-height/#comment-1653234 Wed, 14 Nov 2018 02:39:14 +0000 http://css-tricks.com/?page_id=14071#comment-1653234 While it appears to be five years old, I am altogether glad and thankful for finding this CSS trick since it addressed and corrected a problem I was having with one of my html website pages whereby one of my pages was failing to display text in scrolling down to the bottom of one of my pages when using Firefox or MS edge but not in Google Chrome. Interestingly enough, I was experiencing similar behavior in the early ongoing with one or more other Hhtml pages whereby I was able to rectify the issue through trial and error by modifying the padding and margin attribute values in my external CSS. However, this eventually became a real pita in that modifying the values ended up working for one but not both pages whereby I was eventually forced to use inline CSS in the remaining html page to override that provided in the external CSS. Then, wouldn’t you know it, another one of my website pages began acting up exhibiting similar behavior when viewed in FF and MS edge. I then added the min-height attribute as described herein to a section in my external CSS and, voila, this resolved the problem once and for all.

]]>
By: Mr Alexander https://css-tricks.com/almanac/properties/m/min-height/#comment-930455 Mon, 23 Dec 2013 22:19:36 +0000 http://css-tricks.com/?page_id=14071#comment-930455 Hi Chris,

I have been developing sites for many years and consider you a reputable source when developing, well done.

Just a quick note about this, not sure how “compatible” this technique is as height is what sets the boxes’ height where as min-height is the secondary property.

To my knowledge if min-height is greater than height than the container would “overflow” beyond its contents and may cause some inconsistency across the browsers.

Am I missing something or over thinking?

Looking forward to your reply,

Mr Alexander

]]>
By: Daniel https://css-tricks.com/almanac/properties/m/min-height/#comment-817338 Thu, 12 Dec 2013 14:54:33 +0000 http://css-tricks.com/?page_id=14071#comment-817338 I think the browser support table is inaccurate… For example Firefox 2+ supports min-height, according to http://caniuse.com/#feat=minmaxwh

]]>