Search code examples
htmlcssvisual-studio-codelive-previewfile-link

My Visual- Code-Editor is not showing the included CSS in the Live preview


I just reinstalled windows on my computer. The problem here is that when I was using the visual code editor before reinstalling windows with the live preview extension and it ran perfectly, but now after I installed windows the VC do not give me live preview like before. It is just showing the HTML structure and not the linked CSS and Javascript files. There is no styling and formatting being shown on the page even though the page displays perfectly on the browser, tried everything but nothing worked. Note that both windows versions are the same no changes in them.[Only HTML shows up][1]

[no definitions found said by vs code editor also]


Solution

  • Yes, it only shows the HTML preview without CSS. You have to use "Live Server" extension for that.

    Download that from here: https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer

    GitHub Source: https://github.com/ritwickdey/vscode-live-server-plus-plus

    Preview:

    enter image description here