amodrono
amodrono

Reputation: 2040

GitHub Pages doesn't load CSS

I'm making my personal website using Bootstrap, Font Awesome Icons and my own styling.

When I run my website locally, it seems to work properly, but when I push my changes to my repository, the CSS isn't working.

Example code:

<a href="https://twitter.com/amvro_" target="_blank"><i class="fab fa-twitter" style="font-size:40px; color:#2AA3EF" target="_blank"></i></a>

For example, this makes a simple blue button, using font awesome and some styling. When I run it, it shows a blue button, and when I the pointer is hovering the button, it's opacity changes to 70% instead of 100%, but when I push it to gh-pages, it shows a white twitter icon, which doesn't do anything.

Github Repository.

Upvotes: 0

Views: 314

Answers (1)

Patrick Mexal
Patrick Mexal

Reputation: 36

From looking at your repo, it appears to be a relative file path issue. In index.html, try changing your CSS link from "styles.css" to "./styles.css".

Upvotes: 2

Related Questions