I’m using this tool to validate a CSS file: http://jigsaw.w3.org/css-validator/
I have 23 errors in my CSS file and more than half look like this:
Line 46 #left_navigation Parse Error ;*width: 175px;
The actual CSS looks like this:
#left_navigation {
float: left;
width: 165px;
*width: 175px;
margin:0px;
padding:12px 5px 5px 5px;
}
The error is due to the asterisk setting the width. I didn’t put this here originally, but it’s clear that its needed to deal with some display problems in IE.
So my question is: do I care about these errors? Is there another/better way to be doing this? I can’t just take it off because bad things happen in IE when we do this.
If you wanna go for a valid CSS hack,
the following allow you to include a solution without necessity to include the whole modernizr script or changing the HTML (pre-)header by adding IE conditional comments:
* html #left_navigation { width: 175px; }for IE4-6 and*+html #left_navigation { width: 175px; }for IE7See http://en.wikipedia.org/wiki/CSS_filter#Star_hack