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
ABK | Muneer
ABK | Muneer3y ago
i also see some people use vh
nickymicky
nickymicky3y ago
use either rem or em
ABK | Muneer
ABK | Muneer3y ago
for padding as well ? wouldn't that make the padding big for people that set their device font big?
MarkBoots
MarkBoots3y ago
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 ...
ABK | Muneer
ABK | Muneer3y ago
i'll watch it right now thx !
nickymicky
nickymicky3y ago
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😁 .
MarkBoots
MarkBoots3y ago
well padding is the breathing space for text content, so i would let them work together. bigger text, bigger padding
Want results from more Discord servers?
Add your server