Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Dan Williams
Dan Williams
5,339 Points

When is the right time to start using Viewport units: vw, vh, vmin, vmax ?

I understand that there is currently limited browser support for vw, vh, vmin, vmax.

However, saying that they work for the output browser my users view the site in, do they offer a more simple method to get around designing a more adaptive responsive web site?

From what I understand at the moment using ems and media queries etc lets you create a site that resizes on different devices and screen resolutions etc.

But these seem like an easier way to achieve this?

2 Answers

Kathleen Cook
Kathleen Cook
6,240 Points

If I were you, I would use whatever units I preferred, especially if they work in the browser you're designing for. If cross-browser support isn't an issue, go with the new units!

Matt Campbell
Matt Campbell
9,767 Points

Cross-browser support is IMPERATIVE. You are effectively righting off billions of potential visitors to your site by developing for only one browser that supports things others don't. The only time you can forget about browsers is like now with IE8 as it's finally dyeing out and Microsoft is stopping support for the OS it came with and probably the browser itself but I haven't verified.

You can look into shivs like modernizr.js to see if they support the new units. If so, they will help ensure cross-browser compatibility to take care of old browsers that never supported it.