MyDaftQuestions
MyDaftQuestions

Reputation: 4691

Firefox not rendering min-height

min-height is not working in Firefox, but works in IE, Edge and Chrome

<html>
<body>
<div style="min-height:80%; background:#543;">
</div>
</body>
</html>

What do I need to do to show the min-height? Pixels is not an option, it needs to be %

Upvotes: 3

Views: 69

Answers (1)

stalin
stalin

Reputation: 3464

add this to css

body, html {
 height: 100%
}

Why ?

because the percent is calculate based on the parent and right now the body and html don't have height

Check this fiddle

Upvotes: 1

Related Questions