Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS Enhancing Design with CSS Styling Boxes Adding Content Using CSS

James Parker
James Parker
3,212 Points

In our callout class some values like width have px. Should we be using something like rem?

.callout{ display: block; width:250px; padding: .25rem 1rem; border-radius: 20px/10px; margin: 1rem auto; box-shadow: 1px 2px 3px rgba(0,10,30,.5); background-color: #cc4e13; color: white; text-align: center; font-size 1.25rem; }

1 Answer

Steven Parker
Steven Parker
217,573 Points

When you want something to (always) be a specific size, use px. Also, while rem (and em) can be used for dimensions, they are typically only used on text, since they are relative to an ancestor element's text size.