Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Andrew Wiley
Andrew Wiley
3,263 Points

Why and when would we use pixels if we can just use em's and percentages to make our web page scaleable?

I see no point in using pixel anymore if I can just use em's and percentages.

1 Answer

Brady Borkowski
Brady Borkowski
7,495 Points

Pixels are static while em's and percentages are relative. There may be situations in which you want to use a static and unchanging size opposed to a percentage.

If you enjoy using percentages and em's then power to you, but others may find advantages in using pixels depending on what they're working on.