@imparassharma
Posted
I generally use vh or vw for the main component of the design so it is bit responsive for every dimension. I use px for font-size and small margins and paddings. rem is scalable means browsers will adapt the rem size according to the browser of the system while px are not-scalable. Other user accessing your website cannot force change its size.(If he has some theme or preferred browser font size).
Marked as helpful
@gchristofferson
Posted
@imparassharma Thank you Paras! So if I don't want users accessing the website to be able to force change the font-size, I should use px, correct? :-) Otherwise, if I do want to allow them to change font-size, it should be set to rem?
@imparassharma
Posted
@gchristofferson It is one of the property....There is so much to learn to get a proper reason where to apply px or rem. But my advice is for small things use px like font-size etc and for positioning use rem/ % etc this will make your webpage responsive and you have to write less media queries for other dimensions.