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 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
217,569 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.