0

i discovered some strange behaviour on my nexus 5 - or am i doing something wrong?

i use this css for a bigger font on mobile devices with small displays (or in portrait view)

html {
    font-size: 14px; 
}

@media screen and (max-width : 800px) {
    html{
        font-size: 20px;
    }
}

when loading the page in portrait view on my nexus 5, it looks just like it's supposed to: 20px font-size. now when turning the phone to landscape view it changes to 14px. so far so good.

now when turning the phone back to portrait view, the font-size stays 14px. Why that? My mistake?

Matthias Schmidt
  • 585
  • 1
  • 7
  • 25

1 Answers1

3

I'm not sure, but did you set a viewport meta tag?

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

Tim
  • 1,680
  • 2
  • 15
  • 21