Viewport vs Percentage Units

Avatar of Chris Coyier
Chris Coyier on

DigitalOcean joining forces with CSS-Tricks! Special welcome offer: get $100 of free credit.

Ire Aderinokun with a reminder that 100vw is sometimes wider than the viewable area (because scrollbars). The same is true for vh units, but it’s rare websites have horizontal scrollbars.

But the best bit is about sizing images such that no matter the screen size there will be a position you can scroll to such that you can see the whole image.

Direct Link →