I’ve just started learning HTML and CSS. My problem is that, when I upload the folder containing everything the CSS doesn’t seem to be working. It works fine on my apache2 local server. I’ve tried putting the “style.cs” file in the same directory as “index.html”, I’ve tried adding the “<base href="/">” tag, I’ve looked at other topics about this same issue but none of them solved my problem.
Thank you very much!
Such a newbie mistake haha.
May ask why does it work on my local server but not on Netlify? even with the wrong name “style.cs”. Does Netlify specifically look for “style.css”?
Netlify uses the file extension to determine the mime type of a file. I wonder why your local server was working fine, most likely it was still returning the mime type as text/css. For browsers, that is enough to make it work as a CSS file. But when you uploaded it to Netlify, the mime type was served as text/plain as Netlify doesn’t know what a .cs file is and it appeared to be a normal text file.