rem or px for padding and margin
i want to practice using the right thing in my code and i think using rem is a better approach than using px but now the padding and margin and i don't know which one would be better to use in that case
7 Replies
i also see some people use vh
use either rem or em
for padding as well ? wouldn't that make the padding big for people that set their device font big?
think this is a good video for you
https://www.youtube.com/watch?v=N5wpD9Ov_To
Kevin Powell
YouTube
Are you using the right CSS units?
There are a lot of different units that we can use when writing CSS, in this video I give some general rules of thumb of which ones are best suited for which situations.
Zell's article on media queries: https://zellwk.com/blog/media-query-units/
Em vs. Rem: https://youtu.be/_-aDOAMmDHI
Using clamp() for fonts: https://youtu.be/U9VF-4euyRo
The ...
i'll watch it right now thx !
yes, but we can't make everyone happy😅
yeah, this is a good video, I've watched it too, but it was a while ago. I don't even remember what he said in that video😁 .
well padding is the breathing space for text content, so i would let them work together. bigger text, bigger padding