During the process of creating a static website, I utilized VS Code and Live Server on my Windows machine. The site appeared to function properly.
However, upon transferring the files to my CentOS machine to run the site through nginx, the site loaded correctly and the bootstrap carousel worked, but my custom CSS, which was designed to address specific issues on the site, did not seem to be taking effect.
Interestingly, when I opened the files statically in Firefox on my CentOS machine (by going to Files -> Open File), the CSS worked as expected.
In an attempt to troubleshoot the issue, I examined the networking tab in the Developer Tools and confirmed that the .css file was being transferred to the browser. However, despite this, the CSS just would not apply when the site was served through nginx.
Another peculiar observation in the networking tab (when served through nginx) was that when I clicked on the CSS file and viewed the Response -> Response Payload, all of the CSS instructions appeared grey, suggesting that the CSS was commented out. However, this was not the case as there were no actual comments in the CSS file.
EDIT
Upon further investigation, the networking tab indicated that nginx had marked the CSS file with a content type of text/plain.