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 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 ;(