+ 1

Why doesn't my external .css file work?

So, i have a pretty easy html and css file right now, but i can't seem to make it work. I have a folder called "css" where i saved my style.css file. html code https://code.sololearn.com/WQ1LbJQeEK2Z css code https://code.sololearn.com/WsG80f14VCG9 I'm using sublime ide, if that is relevant. Thank you.

30th Nov 2020, 11:17 AM
Jordi
Jordi - avatar
8 Réponses
+ 1
ok it had something do with the <a> tag. I removed it and now it works.
30th Nov 2020, 12:59 PM
Jordi
Jordi - avatar
+ 2
i have <header> <h1><a href="index.html">Portofolio Jordi</a></h1> <nsav> <a href="">Home</a> <a href="">Work</a> <a href="">Contact</a> <a href="">About & CV</a> <a href="">Blog</a> <a href="Logboek.html" target="_blank">Logboek</a> </nav> </header>
30th Nov 2020, 12:57 PM
Jordi
Jordi - avatar
+ 1
make sure the css folder in the same location as the html file ,
30th Nov 2020, 11:25 AM
Med Amine Fh
Med Amine Fh - avatar
+ 1
It is in the same folder. I have a folder called "html". In that folder is my index.html and the css folder. html - index.html - css (folder) - style.css
30th Nov 2020, 11:28 AM
Jordi
Jordi - avatar
+ 1
try this : href="./css/style.css"
30th Nov 2020, 11:32 AM
Med Amine Fh
Med Amine Fh - avatar
+ 1
still not working.
30th Nov 2020, 11:36 AM
Jordi
Jordi - avatar
+ 1
I see no h1 tag in the html file to style it , so you have to fix the html file first , add the body tag add h1 tag inside the body after that check if that works
30th Nov 2020, 11:40 AM
Med Amine Fh
Med Amine Fh - avatar
+ 1
i have all that, just didn't show it.
30th Nov 2020, 12:42 PM
Jordi
Jordi - avatar