JP Hochbaum
JP Hochbaum

Reputation: 647

HTML page can't load CSS file, resource not found error

I am baffled as to why this isn't working. Below is the reference to the css file in the head tag:

<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<head>
 <link rel="stylesheet" href="Candidate.css"/>
</head>
<body>

Here is a screen shot of the directory path and console output:

enter image description here

enter image description here

Upvotes: 0

Views: 1173

Answers (1)

Brendan
Brendan

Reputation: 119

Try getting the entire path to your file.

So if your using xampp your path might be:

C:\xampp\htdocs\website\css_folder_name\Candidate.css

However in practice your relative path is usually used so if your css file is in its own folder and your index.html is in the root directory where the folder for your css is you would type:

..\Candidate.css

The ..\ is a way of referencing the folder one level higher

Upvotes: 1

Related Questions