Reputation: 41
I pushed my project to git, and it was working just fine. However, now that I've cloned it onto a new computer, it's unable to link my html HTML my CSS stylesheet.
Here's the directory(?):
And here's the link throwing the error on the node server:
<link rel="stylesheet" href="/style.css" />
I'm sort of at a loss for what could be going wrong, especially after trying to link it with the path ../public/style.css
Any help appreciated!
Upvotes: 0
Views: 57
Reputation: 105
Have you tried using the absolute path for testing? Let's try using this method.
<link rel="stylesheet" href="./style.css" />
If your server is making public folder not a part of dockroot, then that might be the case for the error.
Upvotes: 1
Reputation: 163
I can't get your problem. if the problem is in html file path 3rd option will help you. sorry if this isn't work.
<link type="stylesheet" href="style.css">
- The "style.css" file is located in the same folder as the current page.<link type="stylesheet" href="public/style.css">
- The "style.css" file is located in the public folder in the current folder.<link type="stylesheet" href="/public/style.css">
- The "style.css" file is located in the public folder at the root of the current web.<link type="stylesheet" href="../style.css">
- The "style.css" file is located in the folder one level up from the current folderUpvotes: 1