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 Width and Height Properties

Daniela Agnoletti
Daniela Agnoletti
8,687 Points

Header height

How come when Guil adjusted the header height it added the space at the bottom of the content? Why didn't they add the space to the top or evenly around? Around 2:15 of the video.

1 Answer

Steven Parker
Steven Parker
229,785 Points

The term "height" might be misleading. Perhaps it would help to think of it as "length" (though you can't use that word to make the setting). So this setting is just a generic increase in the vertical dimension. And since elements are rendered from top to bottom, the extra space shows up at the bottom.

That's just a default, there are many ways to tell the system how you want the space used. so it could be at the top if you want. You'll be learning exactly how as you proceed through this course.