@kaiser-sb
Posted
Hey Emily,
Great job completing your first project! Regarding best practices - it all depends on the context and layout in which you're using it. E.g. - for font sizes, it's better if you could use rem
. This helps in case you change the root font size in the html
part - you get the proportionate change in whole layout. For margins, you can use percentage or px
- depending on whether you want a proportionately changing layout or a fixed measurement.
For width and heights, you can combine both by using percentage values and setting a max-width
, max-height
, min-width
or min-height
to get a fine layout. Also, you can use vw
or vh
- to size your elements according to viewport width or height. So it's all about mix and match and using them depending on where and how you wish them to place. Hope this helps. Happy coding!
Marked as helpful