Here is the issue:
I’m encountering an issue with Visual Studio Code’s Live Server extension (by ritwickdey) where it’s not applying any of my CSS styles when I launch the live preview. The HTML is displayed correctly, but it seems as if my CSS is not being recognized at all. Here’s what I’ve tried so far to resolve the issue:
I’ve restarted Visual Studio Code to rule out any temporary glitches.
Checked my workspace settings and file associations to ensure they are correctly configured.
Verified that Visual Studio Code is up to date, so it’s not a bug in the software.
I’ve meticulously reviewed my code, both HTML and CSS, and have ensured that it’s free of errors. I’ve even validated it using the W3C Markup Validation Service.
Despite all these efforts, my CSS styles are still not being applied when I use Live Server. Has anyone else encountered this issue, and what steps can I take to resolve it? Any insights or troubleshooting suggestions would be greatly appreciated.
2
Answers
Remove your Cache first. If you have linked properly then it will need to work properly. First check your CSS link path and secondly remove your cache.
It is more likely you have not linked the css file appropriately. If it persists, have your css code within style tags within the head tag of you html code