mango mango - 11 months ago 82
HTML Question

How to link index.html to css file for github page

I'm hosting a github page and want to link index.html to main.css, which is in a folder called "stylesheets" also in the root directory.

my file structure:

- main.css

right now I have:

<link type="text/css" rel="stylesheet" href="/stylesheets/main.css" />

in the
, but this doesn't work?


First, you should create gh-pages branch that special branch of GitHub.
You can find and create it in setting page of you project by the button Automatic page generator.
The branch will map to the doamin

So the path should be stylesheets/main.css not /stylesheets/main.css