Richard Grevers wrote: > ... > > I am struggling with my conditional comments syntax. The MSDN > reference [1] does not give any examples of using comparison > operators.
The operator compares two arguments: op a1 a2 > If I use <!--[if lte IE 6]> as per some example sites, the styles are > not applied. This is the correct syntax. The following is served to IE less than or equal to the version number 6. The problem is not the Conditional Comment here. I think you have IE7 installed side-by-side to a IE6 standalone. If this is the case, note that every IE shares the same version vector: "7.0000" (since beta3, it is not "7.0b" anymore as it was in beta2). MS does not support two versions of IE next to each other, the official recommendation is to use virtual machines, or to use another development machine. If this should not be your favorite solution to the problem for some reasons, then you may use just the conditional expression [if IE], and filter the old way with the star html hack inside <!--[if IE]> <style type="text/css"> * html #outer, * html .maincolumn { whatever: value} * html #wsm_services { whatever: value} </style> <![endif]--> > > But if I use <!--[if IE lte 6]>, the corrected styles are applied, but > for some reason IE (both 6 and 7) is displaying the conditional > comment code <!--[if IE lte 6]> <![endif]--> at the top of the page In the msdn article you are citing, there is no error recovery strategy for the parser defined. Meaning that there is no such strategy. Showing the wrong syntax could be a good idea, but applying the rules nonetheless is not. "Conditional comments are processed during the downloading and parsing phase, so only the content that is targeted for the browser loading the Web page is actually downloaded." According to this, IE is wrong applying the rules, because the target expression must not apply. > > See http://www.dramatic.co.nz/wfsm/test3.html for a demonstration. > > [1] > http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/overview/ccomment_ovw.asp Ingo -- http://www.satzansatz.de/css.html ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/