CSS stylesheet changes not showing up in localhost (XAMPP)
I'm creating a website and currently making it using XAMPP and Localhost before I buy a domain and upload it. However, for the first time ever (I've worked on/off with XAMPP for 2 years for college courses) the changes I make to my stylesheet aren't showing up in my files. I have the following files in a folder:
header.html
footer.html
index.php
style.css
When I force open style.css in the localhost browser I can see the right CSS coding, however when I open index.php the changes are not showing up (the colors aren't changing or anything). I'm linking to the stylesheet in my header, which in turn is includes in the php-file. Simplified my codes look like this:
My header:
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Test</title>
<link rel="stylesheet" type="text/css" ahref="style.css">
</head>
<body>
<header>
<nav>
<ul>
<li>test</li>
<li>test</li>
<li>test</li>
</ul>
</nav>
</header>
My Footer
</body></html>
My index.php file:
<?php include('header.html')?>
Test test test
<?php
include('footer.html')?>
Why isn't the CSS showing up when opening the index.php in localhost? And why is it only now this is happening? It has never been an issue before? How do I get it back to not being a problem?
Solution 1:
You have used ahref
in your link rel
;
change;
<link rel="stylesheet" type="text/css" ahref="style.css">
to
<link rel="stylesheet" type="text/css" href="style.css">