Visual Studio Code help

Hey I’m hoping someone familiar with VS code can help me out. I’m working on a small navbar that uses html, css and js. I want to open it with “live server” to troubleshoot but only the html loads in the browser, even though I have both the css and js files linked properly.

I’ve used vs code before and didn’t seem to have the same issues but am thinking it was maybe node.js that was the difference.

I’ve googled it and can’t find much so any help would be much appreciated!

Hey @MarcelPenn, I used VSCode and Live Server a lot, and:

  • Live server doesn’t have to do anything with your JS and CSS. I used Live Server everyday, and It always works.
  • It shouldn’t be Node.js because it’s a server type code. You also have to enable it anyway using the node command on the terminal.
  • Can you maybe share the code where you link your CSS and JS. Make sure you link it right. Check if it is on the right directory. Check if maybe you made a little mistake.
  • What you can also do is check the Developer Console and go to Source and check if the file is rendered or not.

Right I used to use it as well and it worked fine.

This is the code, I’m pretty sure the links are correct but maybe it’s a file/directory issue like you said…

@MarcelPenn, There’s your problem, your CSS file is called style.css but when you link it, you pass in styles.css, there is an extra S in there.

style.css not styles.css. I’m an idiot.

Yeah i noticed it too when I went through that time, appreciate the help

1 Like