DEV Community

Discussion on: %, px, em, rem, viewport...How to know which one to use in CSS for responsive design?

emptyother profile image

I have had good experience with using mostly EM for heights and % for widths so far. And REM to reset the font size when I'm doing component-like development. Viewport sizes (vh,vw) only on root elements. Not on floating components.

jharteaga profile image
Jose Arteaga Author

Thanks for your answer! Definitely I need to retake this topic and understand deeper some units. I think I'm mixing all of them without reason.