Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Responsive typeface with em not working

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #239887
    steph
    Participant

    Hello,

    I have set my website’s font size to be 1.3em because I read that if you use em as the font size measurement unit, it will automatically scale on mobile or on shrank screen.

    Well it doesn’t work. When I shrink the screen, the letters are giant, so I have to reduce them manually to 0.7em in order to appear nicely on mobile, that is max-width:320px

    Am I doing something wrong? Should I use another measurement unit in order for my typeface to be responsive, or I should manually add the rules for handhelds devices? Or am I totally wrong?

    Thank you so very much for the help!

    #239889
    pknauti
    Participant

    em is not responsive by default, it is related to base font size. You can use @media-query to change base font-size.

    http://codepen.io/pknauti/pen/dMzPLb

    #239915
    steph
    Participant

    Thank you for the reply. So em is like the percentage then? In a sense that it will increase/decrease the font size based on the initial body value?

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.