• Resolved shortajay

    (@shortajay)


    So I am a n00b and was wondering why people start content divs in the header php file and end them in the footer? I’m looking at several template themes and it doesn’t make sense to me. Why wouldn’t one just start and end a div within the file it’s being used in (e.g. start and end the content div within the index.php file)?

Viewing 5 replies - 1 through 5 (of 5 total)
  • If the tags are in the header and footer you don’t need to duplicate them in every template file. This makes them easier to find and maintain if a change to the HTML structure of the site is needed.

    In addition, if the div is intended to surround the page content, it needs to start in one file (header.php) and end in another (footer.php).

    Thread Starter shortajay

    (@shortajay)

    i do understand that there is a need not to duplicate divs. but i don’t understand why content divs are made to surround the page content. the ones i’m looking at don’t surround the page content — they constitute the page content. yet for whatever reason, people start and end them in the header and footer files. no formatting in the CSS would change how it displays, and none of it affects the header or footer.

    This doesn’t matter in the least. In your own themes do your own thing. I am with the OP. Its nonsense. It started in Kubrick.

    Thread Starter shortajay

    (@shortajay)

    thanks root!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘why start content div in header?’ is closed to new replies.