Take the 2-minute tour ×

In jquery-ui-1.8.6.custom.css, I found this gem:

/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
.ui-datepicker-cover {
    display: none; /*sorry for IE5*/
    position: absolute; /*must have*/

Apparently, repeating the display style is a workaround for a bug in IE. If I understand CSS correctly, this should behave like display: block; (i.e. the first entry should be overridden by the second).

For which version(s) of IE is this necessary? Only 5.x or 6 as well?

share|improve this question
Your understanding is correct, I just can't recall which specific version of IE trips up on this CSS. The hack lies in the /**/. –  BoltClock Feb 14 '11 at 11:05
Rather odd they even bothered with those considering jQuery core's support starts with IE6... –  Su' Feb 14 '11 at 11:47
add comment

1 Answer

up vote 3 down vote accepted

See: http://www.communis.co.uk/dithered/css_filters/css_only/property_empty_comment.html:

#testElement {
   color/**/: #00cc00;

Applied By
Win IE 5.5 - 6.x

Not Applied By
Win IE 4.0 - 5.0

So, the comment /*sorry for IE5*/ aptly describes the hack - the zero IE5.0 users still in existence will not be able to see any .ui-datepicker-cover elements.

share|improve this answer
Nice digging. That's some seriously old-skool filtering. I don't think I ever used this particular one, even back then. –  Su' Feb 14 '11 at 11:55
add comment

Your Answer


