Cannot access folder

Can somebody pls. help me with this error Cannot GET /webpages/design/main.css I don’t understand why this error suddenly appear. this what the mdn document is telling me Content-Type

The Content-Type representation header is used to indicate the original media type of the resource (prior to any content encoding applied for sending).
:slight_smile:

The resource from “http://127.0.0.1:5500/webpages/design/main.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).

Hi can you provide the code you used for import the css file, it would be very usefull for a better understanding;
Make sure that the file path to your CSS file is correct. Double-check the URL you are using to request the CSS file and ensure that it matches the actual path and filename on your server.

Oh and from what can I see you inserted as a type the (“text/html”), when considering you’re using a css file, you should declare it as (“text/css”)

1 Like

this is the path that cause error:
<link rel="stylesheet" type="text/css" href="design\alwenalogin.css">
and this is the solution in stackoverflow :
<link rel="stylesheet" type="text/css" href="\design\alwenalogin.css">
it worked i don’t how did this happen i’m using the former to access folders it suddenly not accept it today. atleast stackoverflow provided answer. to my bewilderment the window OS suddenly demand that I should put \ before the folder address to access the css code. so creepy it acted like the government.

Actually you changed the type attribute from “text/html” to “text/css” based on what you wrote in the second message so I think the problem was that and now you just copy pasted the correct type from Stakoverflow, and it fixed the problem…

In every case I’m happy your problem is fixed, have a good coding!

2 Likes