kanta1205
kanta1205

Reputation: 1

Why are my CSS files not linking to my HTML files?

I am currently facing a problem of not being able to link my CSS files to the HTML files that are located in the same folder. About a year ago, I did a project where I built a simple website using HTML and CSS. Now when I download the folder from my Google Drive and try to open the HTML file with Chrome, I see that the CSS effect is not applied. However, after going back to the folder to open and close the corresponding CSS file, when I try opening the HTML file again, then the CSS effect is shown. I have no idea why this is happening but does anyone have any idea? I have a folder called snappers and inside that folder, I have three different folders, one that stores HTML files, one that stores CSS files, and one that stores images used for the website.

Upvotes: 0

Views: 73

Answers (1)

Yalcin Kilic
Yalcin Kilic

Reputation: 800

Based on your folder structure you have to go one directory up to access the css-folder:

"../css-folder/css-file.css"

Upvotes: 1

Related Questions