What is the main difference between "em" and "px"?

I have seen em is used over px in many CSS files. What is the main difference and which is preferred?

Comments

  • em is used to facilitate zooming where the elements will render smoothly in a high zoom level.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion