Problem loading CSS in GIT


#1

Hello there! I just finished working on the Excursion project. When I pushed it to Git pages, the CSS does not load, only the html loads up without the images or the video! It works when I try it on my own browser tho…
the css path is

"C:/Users/sghim/Desktop/Projects/excursion/resources/css/style.css"
I made all the directories and files just like the assignment asked to and the path to css seems correct too… But somehow it does not work and it has not worked on several of my other projects either.


#2

the values you use for href and src only exist on your computer.

where is the html file located? lets say its in C:/Users/sghim/Desktop/Projects/excursion, then you could use a relative path to make your code more portable:

<link href="resources/css/style.css" ...>

... is rest of code.

otherwise, you need exactly the same file structure and path on every machine, which is really difficult

also, <center></center> is outdated, don’t use it.