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 trial

PHP Build a Basic PHP Website (2018) Listing and Sorting Inventory Items Creating the Catalog Array

wrapper div

Why did they give the class of wrapper to the div?

Isn't there already a div with the class of wrapper in the header.php include?

I know you can have multiple instances of classes, but isn't the wrapper for the whole page and if so, wouldn't you now have 2 wrappers on the page?

2 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,252 Points

It's been a while since I've taken the course but my assumption is this is to provide a wrapper for content rather than the interface itself.

Actually looking at the course name again I've not yet taken this course but again there must be a consideration of CSS media query breakpoints going on here. Have a place and see if there's any negative effects to the web site you're building of not having the second wrapper div. :-)

I got confused - the 1st wrapper was for the nav and had opening and closing tags on the header include.

I thought the 1st wrapper div was for the whole finished page (like a main tag) and the closing div tag was on a separate include/file!

Thanks for the help, the tip about trying it really helped.