paint-brush
Using viewport units to scale fixed layoutsby@sebastian.eberlein
13,872 reads
13,872 reads

Using viewport units to scale fixed layouts

by Sebastian Eberlein3mMay 29th, 2017
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

There are plenty of ways to use <a href="https://hackernoon.com/tagged/viewport" target="_blank">viewport</a> units, covered in <a href="https://css-tricks.com/fun-viewport-units/" target="_blank">many</a> <a href="https://www.smashingmagazine.com/2017/05/fluid-responsive-typography-css-poly-fluid-sizing/" target="_blank">good</a> <a href="https://css-tricks.com/between-the-lines/" target="_blank">articles</a>. But the use cases are mostly limited to specific elements. In theory, you could use viewport units to scale the entire website layout relative to the viewport width. Of course, this does not work for most websites. But there are edge cases where you need a layout that is fixed, but also relative to the viewport width.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Using viewport units to scale fixed layouts
Sebastian Eberlein HackerNoon profile picture
Sebastian Eberlein

Sebastian Eberlein

@sebastian.eberlein

L O A D I N G
. . . comments & more!

About Author

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite