I'm having a problem with included files accessing the style sheet in my header.php file.
I've created a very basic outline, with just a nav element outline, to see if I could get my inclusions working properly. My index.html has two links:
- one to a page at the root level, test.php
- a second that is within the includes folder, test2.php.
For whatever reason, my test2.php, although including the header.php element, does not bring in any of the styles. Below is my code from test.php and test2.php, what exactly am I missing?
Test.php
<?php
include 'includes/header.php';
?>
Test2.php
<?php
include 'header.php';
?>
Style.css
nav {
border: 1px solid;
width: 95%;
height: 50px;
}
Header.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="style/style.css" />
</head>
<body>
<nav></nav>