skip to Main Content

When I run my code the css code is not running but the html is. I’m confused because I used the link element but it’s still not working.

File: index.html.

<link rel="stylesheet" href="style.css">

Css file: style.css

I’ve tried changing the file name and double checked if the link element has the right filed linked but it still isn’t working.

2

Answers


  1. Chosen as BEST ANSWER

    I made a mistake the change I was making to the site on css was a selector class that wasn't existing on the html which is why when I ran the code only the html portion was showing.


  2. From your current answer I can only assume, sorry if it won’t work.

    You’re using VSCode. Try using a live server extension, such as this one: ritwickdey.LiveServer Worked for me.

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