Evan Case Evan Case - 3 months ago 29
HTML Question

External CSS not working with Github Pages

I have a web host on GitHub Pages (http://evancase54.github.io), and I'm trying to link to an external CSS file, which is one folder from the root.

Trying it in this way and it does not work:

<link rel="stylesheet" type="text/css" href="styles/index.css">

and I'm not sure how I am supposed to do it.

index.css
is located in a folder called
styles
, and it's saying that apparently it's not found. I don't know the issue that's being caused here, so if someone could help me with this, I'd be very grateful.

Answer

I found the fix. I apparently wasn't using the root /, so it looked like styles/index.css instead of /styles/index.css

Comments