1

I'm new in VS Code and I'm trying to figure out what went wrong here because css won't work for me. The link is good because it opens with click + ctrl. Both files are in the same folder. So why isn't it working?

enter image description here

Edit saved:

enter image description here

Praveen Kumar Purushothaman
  • 164,888
  • 24
  • 203
  • 252
Evela
  • 23
  • 4

3 Answers3

0

Seems like you didn't save index.html. See the round dot? It means it's not saved.

enter image description here

Your code seems fine. Also, it's always better to use a browser than using built in preview.

Spectric
  • 30,714
  • 6
  • 20
  • 43
Praveen Kumar Purushothaman
  • 164,888
  • 24
  • 203
  • 252
0

Use an browser and save your files changes for see your proyect.

Vei Jar
  • 118
  • 1
  • 9
  • 1
    Thank you for answer. It's working on the website but why not in VS Code? What do I have to do to make it work here? – Evela Jun 22 '21 at 22:53
  • Probably that viewer does not support some CSS and HTML features. I recommend you use a live preview extension so that visual studio works as you wish. Search the market for visual studio code. – Vei Jar Jun 22 '21 at 22:56
  • if you have any other questions feel free to contact me :P – Vei Jar Jun 22 '21 at 23:07
0

Save file and try opening it with a browser. I always prefer browser to test a file. Sometimes 2 browsers if it has a problem. I suggest you to use sublime text 3 or notepad ++ with vs code because it can save you from a lot of headaches. :)