Top "Viewport-units" questions

The viewport units `vh`, `vw`, `vmin` and `vmax` are units of measurement relative to the browser viewport size, introduced in CSS3.

CSS3 100vh not constant in mobile browser

I have a very odd issue... in every browser and mobile version I encountered this behavior: all the browsers have …

html css viewport-units
CSS Calc Viewport Units Workaround?

From what I've seen in other answers, CSS viewport units can't be used in calc() statements yet. What I would …

html css viewport-units css-calc
How to implement max-font-size?

I want to specify my font size using vw, as in font-size: 3vw; However, I also want to limit the …

css viewport-units
CSS: Are view height (vh) and view width (vw) units widely supported?

I'm using 100vh to center a div vertically with line-height. This site puts support for vh and vw at around 70%, …

css viewport-units
CSS Units - What is the difference between vh/vw and %?

I just learned about a new and uncommon CSS unit. vh and vw measure the percentage of height and width …

css viewport-units
How to fix vh(viewport unit) css in mobile Safari?

I've used vh (viewport units) css in one of my projects but in mobile safari it doesn't work. It seems …

css height mobile-safari lightbox viewport-units
Is it possible to calculate the Viewport Width (vw) without scrollbar?

As mentioned in the title, is it possible to calculate the vw without the scrollbars in css only? For example, …

css viewport-units
How do I convert a height of an element given in vh to pixels?

I have the max-height of an element as 65vh. I need to convert it to pixels in my JavaScript to …

javascript css height viewport-units
min-height 100vh creates vertical scrollbar even though content is smaller than viewport

I'm applying min-height: 100vh; to a flexbox container and I get a vertical scrollbar when I use justify-content: space-around; I …

html css flexbox viewport-units
Are Flexbox and vh height units not compatible in IE11?

I'm trying to use a flexbox-based layout to get a sticky footer for my page. This works well in Chrome …

html css flexbox internet-explorer-11 viewport-units