skip to Main Content

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


  1. 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.

    Login or Signup to reply.
  2. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search