PHP Build a Basic PHP Website (2018) Building a Media Library in PHP Including the Header

vedant shelat
vedant shelat
16,877 Points

I still dont get the concept of adding <div id="content"> in header.php & not closing div tag in suggest.php? HELP!

I checked related questions ask here, but still dont get it. At this point we dont have the footer.php and the closing content div tag is closed before the opening tag of footer in index.php, so how does it closes automatically in suggest.php?? Thanks!

2 Answers

adam n
adam n
57,287 Points

Looks like when the page is rendered the closing div tag is automatically inserted. See this screenshot:

https://i.imgur.com/AX31inA.png

webremy
webremy
8,606 Points

You are correct in your understanding on what should and should not be included in a shared file. The div content should not have been copied as it limits future options. For the lesson I think they are showing scenario when a div tag may be split up between shared and not shared files and how to account for it so to not get lost among closing div's.