I have menu.php
, and in the <head>
section of menu.php
, I have menu.css
as a link rel
tag of course, both of which work perfectly fine.
Since menu.php
is a 'menu', I've require
d it on pages that need a 'menu' in order to navigate around the website. However, whenever I require
menu.php on a page that has its own CSS stylesheet, menu.php
inherits the <body>
font-size of the other stylesheet.
Here is what I'm trying to say: So if I require
menu.php
on profile.php
, menu.php
elements will become the size of profile.css
, instead of what they really ought to be(menu.css
). How can I fix the following problem? Currently, I am requiring
menu.php
BEFORE the <html>
tag.
Should I put this within <head>
? Somewhere else?
Thank you.
Some of the code from menu.php:
<html>
<head>
<link rel="stylesheet" type="text/css" href="menu.css" />
</head>
<body>
</body>
</html>
I've put my PHP code before the <html>
tag in the file above.
The below code comes from main.php
:
<head>
<link rel="stylesheet" type="text/css" href="main.css" />
</head>