I'm getting this one warning/error in all my CSS files for some reason and I can't quite figure it out. When I run my CSS through the W3C Validator it comes out 100% valid correctly formatted etc. However, when using the web developer toolbar in Firefox I get this warning:
Warning: Expected ':' but found '/'. Declaration dropped.
Source File: filename.php
Line: 0
Has anyone else run into this problem? I understand this isn't really a big problem and normal users would never see this but I'm just more curious as to what is causing this.
I searched Google but wasn't able to find anyone else with the same problem so hopefully someone on here can help.
Looking at this page:
http://cgtweb2.tech.purdue.edu/356/gwindes/project2/
I get the error you described in Firefox's error console.
The reason for this is not inside the CSS file - it's in how you're including the CSS file:
<link href="style.css" style="text/css" rel="stylesheet" />
Can you see it?
It's that style
attribute :)
It should be like this instead (style
-> type
):
<link href="style.css" type="text/css" rel="stylesheet" />
Your error is not in your CSS files. Your error is in your php file(s), and is probably a space at the beginning of filename.php or something related. Without seeing your PHP it's hard to determine what is causing your error, but could be something related to a rewrite rule, importing of a file, etc..
For me style="height=46px;" gave the error, i corrected it back to style="height:46px;". The warning is related to CSS.
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