Reputation: 15384
This may be a very basic question but it is one I am seeking clarification on as someone who is fairly new to responsive web design.
I currently used pixels for my font-size and set this to say 16px in the body tag. I made the mistake of setting the font-size to 100% and then using ems for all my fonts, this however caused major inconsistencies throughout different browsers so I had to revert back to pixels.
i have read that by setting the body font-size to 62.5% gives the equivalent to 1em. is this correct? or does anyone have a better way of doing this, I would like to know what the current best practice is.
Any advice appreciated
Thanks all
Upvotes: 0
Views: 153
Reputation: 1935
You can set your font size to 62.5% which would be 10px, this is obviously a much smaller font size and a round number thus easier to think in pixels but still set sizes in terms of ems: 1em is 10px, 0.8em is 8px, 1.6em is 16px, etc
Upvotes: 4