Firebug complains about a syntax error in one of my external CSS files and always blames the first line:
SyntaxError: syntax error
For testing purposes I tried to comment out and remove the first rule completely, but the error is still displayed for the next rule. All style sheets in the file are ignored.
Actually this is a JavaScript syntax error, not a CSS problem. This happens when absent-mindedly copy-pasting HTML tags and including a CSS file using a script tag. D'oh!
Actually, the browser tries to parse the CSS content as JavaScript, which of course does not work. The solution is simple:
<script src="style.css"></script> <!-- won't work -->
<link rel="stylesheet" type="text/css" href="style.css"/> <!-- better :) -->
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With