How to make a div 100% height of the browser window
Asked 07 September, 2021
Viewed 1.4K times
  • 61
Votes

I have a layout with two columns - a left div and a right div.

The right div has a grey background-color, and I need it to expand vertically depending on the height of the user's browser window. Right now the background-color ends at the last piece of content in that div.

I've tried height:100%, min-height:100%;, etc.

30 Answer