Custom CSS/JS not working on GitHub Page #56005
-
Select Topic AreaQuestion BodyI have a GH Page on one of my repos, and my custom css and js is not loading. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
The "custom CSS" linked in your |
Beta Was this translation helpful? Give feedback.
-
Thank you, this was the result of following another discussion on github and i ended up doing more harm than good. |
Beta Was this translation helpful? Give feedback.
-
Now my custom cursors and favicons are not appearing on the website :( |
Beta Was this translation helpful? Give feedback.
-
You have invalid absolute links there. E.g. for the favicon: <link rel="icon" type="image/png" sizes="32x32" href="/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicons/favicon-16x16.png"> Because of the leading slash the browser will look at The problem with the cursor is basically the same, mind that in that case the relative location is relative to the stylesheet. |
Beta Was this translation helpful? Give feedback.
-
i fixed the favicons, but i cannot fix the cursor |
Beta Was this translation helpful? Give feedback.
-
update: fixed it :) |
Beta Was this translation helpful? Give feedback.
You have invalid absolute links there. E.g. for the favicon:
Because of the leading slash the browser will look at
https://tahayparker.github.io/favicons/favicon-32x32.png
, which doesn't exist. You should use relative links, in this specific case removing the leading slash will work.The problem with the cursor is basically the same, mind that in that case the relative location is relative to the stylesheet.
See: https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Web_mechanics/What_is_a_URL#absolute_url…