I have DIV element that I want to appear the full size of the browser but will have some padding and rounded corners. That part is easy, but I want it to resize when the keyboard is shown to be the size of the new viewport. I am able to do this just fine with Javascript using window.visualViewport.height. The problem is that some browsers are not giving exactly the right size, so the DIV isn't showing up correctly. Is there any way to do this with pure CSS or in another way that will always work for all browsers?