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 trial

CSS Enhancing Design with CSS Styling Boxes Adding Content Using CSS

James Parker
James Parker
4,154 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
228,978 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.