CSS CSS Layout Basics CSS Layout Project Creating and Styling the Layout Containers

Joshua Kohantab
Joshua Kohantab
4,247 Points

Why does the instructor, using fixed padding values for the main nav elements and not em units

I've trouble with understanding when to use em and when to use fixed units when it comes to padding and margin

1 Answer

Steven Parker
Steven Parker
203,989 Points

You use em units when you want something to vary proportionally to the font size, and px units when you want something to always have the same size. It's often a design choice, so it can depend on what look you're trying to achieve as to which you use.

Joshua Kohantab
Joshua Kohantab
4,247 Points

thank you Steven , for the feedback