1

I have tried multiple file paths in my HTML head to get the CSS to load in GitHub pages but it won't. It loads locally but not on pages.

I tried

<link rel="stylesheet" type="text/css" href="css/components/style.css">
<link rel="stylesheet" type="text/css" href="/css/components/style.css">

<link rel="stylesheet" href="css/components/style.css">

<link rel="stylesheet" href="/css/components/style.css">

None work, any help would be amazing

my repo page

I tried changing the file name multiple times expecting the gh pages css to load it did not

3
  • Try ./ at the start? Commented Mar 31, 2022 at 10:27
  • Does this answer your question? How to link index.html to css file for github page Commented Mar 31, 2022 at 10:35
  • Tried and tested still not working :( thanks though Commented Mar 31, 2022 at 10:35

1 Answer 1

0

The answer to this question is already here. Check out this stack overflow answer, which worked for me.

Sign up to request clarification or add additional context in comments.

2 Comments

A link to a solution is welcome, but please ensure your answer is useful without it: add context around the link so your fellow users will have some idea what it is and why it is there, then quote the most relevant part of the page you are linking to in case the target page is unavailable. Answers that are little more than a link may be deleted.
Hi, thanks for the link but I have already tried this solution...any other suggestions welcome

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.