Answer the question
In order to leave comments, you need to log in
What units of measurement do you use when editing?
A little background: for 3 years I did not approach the computer to make up from the word at all, because I was on maternity leave and I was sure that I would not do this business again. But when the question of work arose, I realized that web development still attracts me. Now I'm trying to enter into the changes that have occurred during my long vacation.
And I actually noticed that many people use em and rem. Of course, I use px or % in the old fashioned way. Tell me where to figure out what is right to apply and in what cases? And how to work with these em / rem? Constantly counting on a calculator? or i dont understand something
Answer the question
In order to leave comments, you need to log in
What units of measurement do you use when editing?
I never bother at all and always use only px and %, no problems arise, already 7 years :)
html {font-size: 62.5%;}
h1 {font-size: 2.4rem;}
p {font-size: 1.4rem;}
Rem is recommended for adaptive. They are also easy to use, unlike em, where you have to remember the value of the parent in your head. Of course one gets confused. And with rem, everything is simple:
html {
font-size: 100% /* =16px */
}
body {
font-size: 1rem; /* =16px */
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question