View Full Version : Validation on unstated element

Jul 20th, 2009, 05:58 PM

Trying to do a little IE6 hacking. A PNG file is referenced in an external stylesheet and used in a number of places. In 1 place IE6 renders it correctly but in the other it does not.

If I place a div element id="ie_box" around the id that calls the PNG background and only give it a style in ie6 hack css file will this cause a validation error in CSS or not?

My thoughts are it won't as it is just looking for a style reference that only exists in ie6.css


Jul 20th, 2009, 06:31 PM
Technically, if you write non-standard CSS (such as CSS expressions, zoom, or filter properties, just to name a few) any validator would complain. However, if the IE 6 stylesheet is included in the HTML document through a conditional comment (http://www.quirksmode.org/css/condcom.html) then this will be ignored by all applications (including validators) and only IE will render it. Therefore you won’t get an error message in a validator.