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!
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
Ryan Hellerud3,635 Points
Why does he include the top closing div in the footer file?
Just seems a little confusing as to why he is copying an extra </div> at the top and I think he did something similar in the last video, too. Can someone explain this please?
Mark Phillips13,124 Points
This same question was asked about a year ago. I was wondering myself so I Googled it and came across this forum topic that goes into a bit of detail as to why these opening and closing div tags were included in both the header and footer files.
Hope this helps!
It is a little confusing. If you look at the page source after the page loads you'll see it looks like normal html (Right click on the page and select view source). This is often done when many pages in a web site have the same header and footer. If changes are desired then it only has to be done in one place. Personally, I don't typically don't split the divs like that.
Right now I'm working on a site were no page has static html, it's all generated by function calls.