1

I am using this "pure HTML + CSS" solution to a flex-layout, that is working fine when I change window size at my desktop browser, but when view the same page in a mobile device, specifically Android's Chrome, the browser do a "zoom out" instead to use CSS @media screen and (max-width: 360px) directive.

How to say to Chrome to use the directive and not doo zoom-out? I need to use a kind of viewport? And the viewport not destroys the desktop layout?

Peter Krauss
  • 13,174
  • 24
  • 167
  • 304

1 Answers1

1

Make sure that you have <meta name="viewport" content="width=device-width, initial-scale=1.0"> in your document <head>.

Please see the tutorials or spec for more information for why this is necessary:

PS: question/answer about javascript access to Viewport

Peter Krauss
  • 13,174
  • 24
  • 167
  • 304
Trob Frank
  • 363
  • 3
  • 11