cmp cmp - 8 days ago 6
CSS Question

Why is font size changing depending on portrait or landscape for mobile devices?

I'm using

px
font size, which may have something to do with it.

However, portrait my font size is a good reading size:

Portrait website design

But landscape the font size is just too large. This is an iPhone 6+ screen

landscape design

Is the best way to resolve this, a media query for portrait and landscape mode?

Answer

Set the text-size-adjust property in your CSS file like this:

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

More info at https://developer.mozilla.org/en-US/docs/Web/CSS/text-size-adjust.