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 trialRyan Hellerud
3,635 PointsWhy 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?
3 Answers
Mark Phillips
13,124 PointsHi Ryan,
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!
Mark
Jeff Busch
19,287 PointsHi Ryan,
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.
Jeff