I am completely stumped as to why this doesn\'t work. It seems the HTML file can\'t load the CSS for some reason, even though both are in the same directory. Any idea what m
With HTML5 all you need is the rel
, not even the type
.
<link href="custom.css" rel="stylesheet"></link>
Use the following steps to load .CSS file its very simple.
<link rel="stylesheet" href="path_here.css">
note: 1--> don't forget to write "stylesheet" in rel attribute. 2--> use correct path e.g: D:\folder1\forlder2\folder3\file.css"
Now where ever directory you are in, you can load your .css file exactly path you mention.
Regards! Muhammad Majid.
Here is another cause to add to the collection on this page. In this code...
<link rel="stylesheet" type="text/css" href="styles/styles.css" media="screen">
...I misspelled rel
as ref
.
I found myself out here looking for an answer and figured out that my issue was a missing character - spelling is important.
<link href="tss_layout.css" rel=styleheet" />
once I put the s in the middle of stylesheet - worked like a charm.
Well I too had the exactly same question. And everything was okay with my CSS
link. Why html was not loading the CSS
file was due to its position (as in my case).
Well I had my custom CSS
defined in the wrong place and that is why the webpage was not accessing it. Then I started to test and place the CSS link to different place and voila it worked for me.
I had read somewhere that we should place custom CSS
right after Bootstrap CSS
so I did but then it was not loading it. So I changed the position and it worked.
Hope this helps.
Thanks!
i have the same probleme, i always change the "style.css" to "styles.css" or any other name and it worked fine for me.