According to others, the font size cannot be completely independent of the screen resolution. What you can do is use media queries for different screen sizes and change the font size accordingly.
body { font-size: 16px; } @media screen and (min-width: 600px) { body { font-size: 112.5%; } } @media screen and (min-width: 800px) { body { font-size: 125%; } } @media screen and (min-width: 1000px) { body { font-size: 137.5%; } } @media screen and (min-width: 1200px) { body { font-size: 150%; } }
These are only approximate values ββ- you will have to experiment with your application of different sizes and see what looks best. A good example of this site is Trent Walton - resize your browser window and see what happens with the size of the text.
If you make the size of all fonts using em or rem modules, you only need to adjust the font size of the body, and the rest of the values ββwill be scaled proportionally.
source share