I have a modal popup box on my site, inside the
This is the styling of the popup:
Setting the width is simple. However, the vertical content is dynamic and therein my problem lies - I don't want the box to be taller than the browser window.
I've tried setting
, and this works if the
of the page is not longer vertically than the browser window.
However, when the
overflows (and scrollbars appear), then the
maximum height above is relative to the height of the
, not the window. This means that the modal box can overrun out of the window vertically, forcing the user to scroll the page to see its full content.
What I want to accomplish is for that max height to be 90% of the browser window
so that the entire modal box is visible at all times.
I will handle overflow, I just need help figuring out how to restrict the vertical size in the way described above.