shorn shorn - 2 months ago 11
CSS Question

Responsive site scaling down on mobile rather than adjusting

I'm getting some weird behaviour that I'm not sure why it's happening.

I'm building out an site. When running this locally in Chrome and Safari, it displays fine, everything adjusts as you'd expect. However, in responsive mode, and when viewed directly on mobile, the entire site is scaling down in size to fit. By this I mean the entire site every element all reducing in size to to be shown as it looks at desktop size.

I'm using Bourbon/Neat, with a bit of flexbox here and there, which I have done many a times before. I've just never experienced this. Any ideas?

Answer

You likely need to add

<meta name="viewport" content="width=device-width, initial-scale=1">

to the <head> section of your html

Comments