It’s an IE9 hack which would be better served using conditional comments to serve the alternate rules to IE9/8 using valid code rather than using invalid hacks that may indeed break should a new browsers think differently. Those IE8/9 hacks are notoriously unreliable as they don’t work on some properties and best avoided.
If you don’t want separate style sheets then use the class on the html approach and you can define alternative rules with the pre-fix.
Yes the /9 at the end is a hack and all browsers that encounter the rule say “hey this isn’t right I’m getting out of here and leave the rule alone”. Ie9 (and IE8 if I remember correctly) incorrectly parse the rule as 64px and 10px and forget about the end bit. Therefore authors have used it as a way of passing styles only to those browsers.
If you use conditional comments (or the pre-fix trick) then you can use the valid rules instead.
That’s different altogether and is shorthand for the font-size followed by the line-heigh i.e. font-size/line-height.
so wanted to check if I should be deleting the /9 or adding a px to the 9 /9px
Just normal as 64px.
if would look at this please, it is also a css validation problem:
Feature -webkit-min-device-pixel-ratio doesn't exist for media screen ) { select.mselect, select.mselect:hover { height: auto !important; } select, select:hover { height: 24px; line-height: 18px; padding-bottom: 0 !important; } }
your help appreciated
None of the vendor prefixes are valid so you just have to ignore the errors/warnings for those. They do follow a valid construct but won;t validate through the validator. However you do need to use them these days so you just have to live with it.
zoom is a proprietary IE only property and not in the css specification (although I believe safari has support for it also) and won’t validate. It’s mainly used to put IE7 and under into “haslayout” mode to ensure consistent rendering. If you aren’t supporting IE7 and under then you can remove it but will likely break IE7 and under very badly. The only way to trick the validator is put it inside conditional comments and call the rules from there. However virtually no one does that these days as we all know why the rules is in the stylesheet and it will do no harm. Validation is merely a means to an end and not a bible. It’s there to point out potential problems but then its up to you to ignore them or not. It’s not a tool for clients to use to assess a site as that is too simplistic an approach.
and a couple of opacity=0 errors,
That looks like part of the IE filter code and IE filters are again invalid code and the only way to validate them is to remove them to conditional comments and hide from the validator. (unless it should have been ‘opacity:0’ which is valid (but not when part of the IE filter code).)
and Sorry, the at-rule @-moz-document is not implemented.
Yes that’s just more vendor prefixes which won’t validate but will do no harm as long as you undesrtand their use.
What some people do is to remove all the invalid rules and put them in a separate stylesheet so that al the main stylesheets validate and just this one stylesheet is invalid. That seems to satisfy clients who don’t know better and also shows that you realise they are invalid rules but needed for the page to display properly…