https://github.com/MadhavaY/RandomQuotesGenerator here is the link to the repository. HTML is loading but css and js are not. Link to the website https://madhavay.github.io/RandomQuotesGenerator/. I saw other answers too but i could not get where am i going wrong.
Asked
Active
Viewed 270 times
3 Answers
0
You need to change the path of both files. As is:
<script src="/All Projects/randomqotesproject/randomquotes.js"></script>
<link rel='stylesheet' type='css' media='screen' href='/All Projects/randomqotesproject/randomquotes.css'>
If you remove the path, e.g:
/All Projects/randomqotesproject/
It should work.

trinaldi
- 2,872
- 2
- 32
- 37
-
Thanks for the reply, i tried to edit the path, i think i have to check in my folders – Madhava Yedla Jul 19 '22 at 14:22
0
Hello madhava I reviewed your project and found out that you are still using your local paths to link your css and javascript
<link rel='stylesheet' type='css' media='screen' href='/All Projects/randomqotesproject/randomquotes.css'>
just change /All Projects/randomqotesproject/randomquotes.css
to
./randomquotes.css

Ramsey
- 104
- 8
-
hey thanks for replying. It still does not work. I opened it on firefox, it shows no css is attached. – Madhava Yedla Jul 19 '22 at 14:20
-
check [this](https://github.community/t/css-not-being-applied-in-pages/10466) post out – Ramsey Jul 19 '22 at 14:22
0
If changing the path doesn't work for you, you can easily add a URL to the CSS and JS instead. EX: https://madhavay.github.io/RandomQuotesGenerator/randomquotes.css

Gage
- 89
- 7