gmatinski
gmatinski

Reputation: 41

Problem with html and css linking them together

I just started using html and css and I have to do something with it but I am getting the error Unable to open 'style.css'. I don't know what the problem is since the path that I used is the same as the file path.

enter image description here

Upvotes: 1

Views: 89

Answers (3)

Md Asadullah
Md Asadullah

Reputation: 3

Sometimes the file may missed directory. You can close and open the code editor and it will work. Also, make sure your html and css file is in same directory. If you css file is in a different directory then use the following code:

<link type="text/css" href=".../style.css"/>

Upvotes: 0

Ash1
Ash1

Reputation: 91

if you want to link site/style.css to mywebs/smth.html you should go one folder back.

<link href="../site/style.css">

or put the site folder inside mywebs, because based on the picture the site folder is not inside mywebs folder.

Upvotes: 1

Yakir Malka
Yakir Malka

Reputation: 308

Make sure the CSS file and the HTML file are in the same folder. based on your image it should be

href="mywebs\site\style.css"

Upvotes: 1

Related Questions