Welcome to the Treehouse Community
Looking to learn something new?
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.