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 CSS Basics (2014) Basic Layout Styling the "Wildlife" div with Background Properties

Jennifer Kauffman
Jennifer Kauffman
1,533 Points

padding and border widths

I do not understand what this challenge wants! I dont know the width and height of the padding and border?? --task 5.

2 Answers

Hi Jennifer,

Normally, the padding and border fall outside the total width of an element. There is a way, as explained in the videos, to make sure that all the border and padding you apply will happen within the width and height you applied to an element.

You don't actually have to know the border or padding for this, just the one declaration.

Try giving it:

box-sizing: border-box;
Jennifer Kauffman
Jennifer Kauffman
1,533 Points

Thanks!! I totally forgot about that one....guess i need to pay more attention ;(