I'm trying to connect my PHP header from a file that is in a folder.
I'm attempting to do this by using:
<?php include("../header.php"); ?>
It works to bring the content in that file on the page, but its not applying the style.css file to the doc. Why?
Here is the contents of header.php:
<!DOCTYPE html>
<html>
<head>
<title>%TITLE%</title>
<link href='http://fonts.googleapis.com/css?family=Lilita+One' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Roboto:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" type="text/css" href="includes/normalize.css">
</head>
<body>
<header>
<div class="page-wrap">
<h2 id="logo">Some Company</h2>
<nav>
<a href="index.php">Home</a>
<a href="contact.php">Contact</a>
<a href="rentals.php">Rentals</a>
<a href="forsale.php">For Sale</a>
</nav>
</div>
</header>
<section id="mainContent">
<link>taghrefproperty is relative to the file that is calling theinclude()and not relative to theheader.phpfile. So, if you are loadingsomefolder/pages/page.phpand you're includingsomefolder/header.php, you are fetchingsomefolder/pages/style.cssand notsomefolder/style.css. Just saying.