@WebDevMirza
Posted
Hello, congratulations on completing this project successfully.
Your query was how to use units in css. Well, there are two types of unit available in css. One is absolute unit and the other one is relative. If you design a responsive layout, you should go for relative unit. Both em
and rem
are relative unit based on parent and root font size respectively.
rem
is the best for font-size.bootstrap
andtailwind
use these relative units, even in margin and padding.
NB: This does not mean that px
is useless. Use it when you feel it.
Thank you.
Marked as helpful