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! While you're at it, check out some resources Treehouse students have shared here.
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 trialAndrea Monty
2,724 PointsPixels and percentages
How do I know when I need to use pixels and when I need to use percentages? I am confused by when I need to be using what when
1 Answer
Nicholas Vogel
12,318 PointsIt depends on what you need. You use percentages and other ratio based units when you need elements to resize with the viewport (browser window). You use pixels and other absolute units when flexibility isn't important. When those times are is completely up to you.
Andrea Monty
2,724 PointsAndrea Monty
2,724 PointsThank You Nicholas!!! That helps me understand much better!