Tuesday, May 5, 2020

note to self: setting a width for mobile via viewport only is easier than you think

I admit I haven't had a lot of luck deeply understanding the Viewport Meta Tag. I had forgotten that desktop browsers tend to ignore it, so you don't have to bend over backwards to suggest a starting width for mobile without affecting desktop...

I use a simple one column layout for a lot of my P5 toys (e.g. coraferris) and so this line is the way of starting at full width:

<meta name="viewport" content="width=560">

(Someday I should really wrap my head around all of those viewport settings, and the way it interacts with CSS @media blocks.)

No comments:

Post a Comment