Mozilla Firefox is not reading my CSS

Hello dear community,
I really need to ask for your help.
I 've been struggling with Mozilla. I dont understand why it won’t read my css file, even though it works in chrome, microsoft edge, opera, etc.
This is the code im writing.

<head>
	<link href="C:\Users\raimundo\Desktop\test\css/style.css" type="text/css" rel="stylesheet">
	<meta charset="utf-8">

</head>

It says: Stylesheet cannot be read.
I 've tried with many advices from different places, and also simplifying the code to

<link href="css/style.css" type="text/css" rel="stylesheet">

but when I do that it would not be read by any of the other navigators as well.

Any idea?

Thanks!

Did you forget to put the code in this post?

Maybe there is something wrong with it like a small typo. Sometimes browsers solve that problem, but not always.

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make easier to read.

See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

Note: Backticks are not single quotes.

markdown_Forums

The post is fixed.
I double checked it and it is unfortunately not any typos. It works well in other browsers.
It might be something of Firefox, like a blocking tool but I dont get it.

In the first one there are both / and \ in the address to the style sheet. It should be \.
And in the second, shorter link you used the wrong one I think.
And I guess that typo is solved by Chrome and Edge, but not by Firefox.

And about typo’s: I make them all the time. And then I think I checked everything and it still doesn’t work. But truth is that you might overlook typo’s if you looked at the text for a long time. Your brain is playing tricks on you by assuming the text is right and creating a picture of what it thinks it says, saving you the time and effort of spelling everything you read and giving you a headache when your code doesn’t work. :grinning:

Good luck with the course!

1 Like

@raimundobg that missplaced forward slash stuck out to me immediately. The path you want to use should be a relative path not an absolute path. If you ever move the website somewhere else the CSS will never load.

If your style.css is in the same folder as you index.html you write the link like this.
C:\Users\rai\project\index.html
C:\Users\rai\project\style.css

<link href="style.css" rel="stylesheet">

If your style.css is in the css folder you write the link like this.
C:\Users\rai\project\index.html
C:\Users\rai\project\css\style.css

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