1

On my computer / PC it is easy, I simply do:

div{
  height: 100vh;
}

to create a div that is the height of the window.

However on mobile browsers the height will actually be more than the view port or window.

This causes the div to be scrollable which I do not want.

I see this on both Chrome mobile and Safari mobile

howard
  • 234
  • 1
  • 11

1 Answers1

1

There's no a css solution. Why, you can read here. If you want to get 100% of actual viewport on load, you can use javascript to read the height on page load, by calling window.innerHeight.

Adrian Kokot
  • 2,172
  • 2
  • 5
  • 18