Jump to content

Em Vs. Px


Recommended Posts

It depends on your goal. An em unit is proportionate to the size of the font being used in an element. If you change the font size, then things like line height and paragraph margins will shrink or grow in proportion.But sometimes a design requires exact units. If three divs need to fit into an 800px space, they need to be defined in px. I generally prefer margins and padding defined in px so that they always look the same.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...