Because you define your wrapper for your navigation menu (which is in your header.php file). If you want your wrapper to wrap your whole document define this in your content.php file.
include navigation and wrapper in all pages and insert new content in each page
-
23-06-2023 - |
题
I have a navigation bar and wrapper saved in header.php
and have included it on my content.php
page. but when i load the content.php
page, the content from content.php
is outside the wrapper from the header.php
page.
<html>
<body>
<div class="navigation">
<?php include 'header.php'; ?>
<h1>Welcome to my home page.</h1>
<p>Some text.</p>
</div>
</body>
</html>
all help is greatly appreciated!
解决方案
不隶属于 StackOverflow