I have a downloaded css file whose size's ok
But in some cases(I have no idea),it just wont work
Is it charset cause this(some comments are Chinese) or Is there any triggers?
And how to test if all rules parsing right?
I came across a common idea:
add a css rule at the bottom of this css file,e.g:.testCss{width:1px} and test if the element with class .testCss 's width is 1px or not
And my other question is?
Are there any solutions to tackle this problem?
Thanks!
1 Answer
To parse CSS, go to the W3C CSS validator
If you are using unicode characters, it may be necessary to specify @charset "UTF-8"; at the top of the file. Read up more about data-types in CSS here in the CSS specification.
To check whether specific elements have the right attributes, use either firebug in Firefox (as @dbaseman mentioned) or Safari and Chrome have inbuilt inspectors. You can right click on an element and click 'inspect'.
You can look at the CSS as follows:

4 Comments
Lanston
The problem is :Is there a way to test if it's parsing successfully with some codes?
jacktheripper
Firstly, validate it with W3C. Then, if its not working still, check the element on your page with an inspector.
Dominik Schreiber
Just to mention: Firefox (at least Version 12) has a pretty good page inspector as well... (faster to use than firebug in my opinion: just right-click the element and hit
q).jacktheripper
Thanks - did not realise this. I use Safari personally, and that seems to have a pretty good one too. More and more browsers have implemented native solutions, in accordance with popular demand!
Ctrl+j. Inspect the elements.