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

CSS

Marcus Tisäter
Marcus Tisäter
4,886 Points

Disable zoom in mobile view

Hello,

Does anyone know if there is a zoom property in CSS that disable users to zoom in mobile view?

I dont want people to zoom when they are on my website browsing on tablet or mobile. I know there is a property for this, don't remeber it's name tho..

Thanks

1 Answer

Tom Bedford
Tom Bedford
15,645 Points

Hi Marcus, you would need to use the viewport meta tag.

e.g.

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />