How do I set only one font-size on the font so that it decreases according to the size of the device?

Asked

Viewed 77 times

2

Doubt quick personal, how do I set just one font-size font so that it decreases according to device size?

I am currently inserting a different font-size size for each @media query, there is a smarter way to do this in a way that I define a single time and it will adjust according to the article or div in which she is?

2 answers

3

Instead of using px in size, formless em, where the value 1em is the font in normal size and 2em twice the size. Try to find a value you like (Ex.: 1.5em, 1.2em, etc.).

0

You can use the new font-size relative

1.5vw = 15px font size

ex: font-size: 1.5vw

but there is still only support for

IE10, IE9, Chrome 22+, Safari 6 and iOS Safari 6, Firefox 19 (late February 2013), Blackberry Browser 10

Browser other questions tagged

You are not signed in. Login or sign up in order to post.