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.


when she had creare header.php , she cut a code from the index.php .

how she know - where to cut ? she didnt cut at the end of the nav .. she add it div - why ?



1 Answer

Hi elad,

In general, you want to go down as far as you can until things start to change from page to page.

After the header div is the start of the content div:

<div id="content">

Alena knew that was going to appear on every page and decided to include it in the header.php file. After that opening div tag is where things start to change on each page so it made sense to stop there.

The closing content div tag will be part of footer.php when you create that.

thanks :)