Online Snippets Library

Set min height of Div in CSS

CSS min-height property is used to set min height of Div Or any element.min-height overrides the value of the height property so that element height can not be smaller than min-height.


min-height: length|initial|inherit;


<!DOCTYPE html>
<title>Set the min-height of an element in CSS |</title>
<style type="text/css">
div {
    min-height: 400px;
    background-color: lightblue;
<h1>Set the min-height of an element</h1>
Hello Friends.