I've started using visual studio code and live server to lớn practice making websites and the main.css tệp tin is not loading with the index.html.

when using the the devtools it appears it's an old version the main.css as the changes I've made aren't showing!

The exact message that comes up is "Could not load nội dung for http://127.0.0.1:5500/CSS/main.scss (HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE)"


The above is the code I've used, I've tried having the css and html in the same thư mục, in different folders and have made sure I'm selecting the correct tệp tin path as when going to lớn type it in it shows and gives the option to lớn autofill instead of typing it all out.

PM 77-1

13.3k21 gold badges70 silver badges115 bronze badges

asked Feb 1, 2021 at 20:56

3

Your url is showing .scss but browser doesn't understand scss or sass

To fix this:

  1. First restart live sass compiler
  2. Make any random change lượt thích remove and add a semicolon in your main.scss and save it. This will recompile the whole main.scss and you will have the updated tệp tin.

IF the issue still persists then tự this:

Try this:

  1. Stop the live server.
  2. Close all the other files in the editor and first only open Index.html
  3. Right click and click on Open with live server.

It will automatically load all your other files.

answered Feb 1, 2021 at 21:09

2