Reputation: 39
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?
Upvotes: 0
Views: 5509
Reputation: 1
I also had the same issue recently, a couple of lines up from the code that was not showing, there was a double ;;! Sometimes it is something so simple.
Upvotes: -1
Reputation: 1
I also had this issue. Even when i deleted everything from my CSS file, it wouldn't update. If you use notepad++ for editing CSS files and never close your tabs, check if you have the same CSS file open in any of the tabs and close them. That instantly fixed my problem !
Upvotes: 0
Reputation: 1714
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">
Upvotes: 2