How To Set body Height To 100% Of Browser Window




Here we consider how to Set body Height To 100% Of Browser Window. First of all, the height of HTML should be 100%. This is because, Body would first look to its Parent for dynamic expansion. Here the parent of the Body is HTML. After setting HTML 100% height, just apply following style for the Body.

Set min-height : 100% for the Body.

html {
         height: 100%;
}


body {
         min-height: 100%;
}



That's all, by this way, we can Set body Height To 100% Of Browser Window.