Connecting HTML to CSS on GitHub

I’m having trouble connecting my ‘index.html’ to the stylesheet on GitHub.
It’s working when I open the Live Server on VSCode, but when I pushed it into the repository, it wasn’t.

This is how I linked it:

< link rel=“stylesheet” href=“/static/css/style.css” type=‘text’/>

I would really appreciate it if you check it out. I was excited about this one.

Here’s the link of the repository:

https://github.com/valeria-ben/Tribute-Page

I think it should be static/css/style.css instead of /static/css/style.css because the static folder is located on the same folder as index.html

w3schools explains here a bit more about file paths in html

Wow! That was it, thank you so much!
I don’t know how much time I spent trying to figure it out. The problem of the css, images and fonts was because of the path I was using.

1 Like

Great to help! I learned that the hard way with my very first project uploaded to github because of this same mistake :joy:

1 Like

It can be a real headache :smiling_face_with_tear:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.