CSS doesn't work on my site but HTML does!

Hi everyone, its my first project in HTML and CSS and unfortunately its not working,
I wrote it on Atom and when i open the website from a local link it works perfectly but when i open it with the Github link it looks like its without CSS, ive tried alot of things but still didn’t work…
I will apperciate your help
this is the link to my website : https://moatazodeh.github.io/website/
and these are my files : https://github.com/Moatazodeh/website

Your index.html includes the stylesheet like this:

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

However in your repository the CSS/ directory name is in capital letters. I assume you’re doing the local testing on Windows, because Windows generally ignores capitalization. Other platforms and browsers do not.

You need to either write the directory name in the href in capitals:

    <link rel="stylesheet" href="CSS/styles.css">

Or alternatively rename the directory to be lower case.

@airtower-luna thanks for answering it did work !

1 Like