Richard wrote: > I am struggling with my conditional comments syntax. The MSDN > reference [1] does not give any examples of using comparison > operators. > If I use <!--[if lte IE 6]> as per some example sites, the styles are > not applied. > > 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 > > 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
Hi, Richard, I found that particular MSDN article rather disappointing, too. I searched around and found another that describes how comparisons are created.[2] According to that article, the original condition <!--[if lte IE 6]> is the proper formation. It could be that, if you have IE 7 on your machine, it is overriding the version information for IE 6. You might want to try <!--[if lte IE 7]> or even <!--[if lt IE 8]> to be safe, and see if that works for you. The reason that the styles are applied, and the conditions appear onscreen, when you switch the order to <!--[if IE lte 6]> is because IE will display conditional comments in the code if they are incorrectly formatted. They also don't comment out the innards of the condition, which is why the styles are applied. The styles are applied in Firefox -- the 1.8em height for the black bar is identical in each browser, and the zoom:1 is properly ignored as an invalid property/value -- they just aren't that important to Firefox. HTH, Michael [2] http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dhtmltechcol/cols/dndude/dude071798.asp ______________________________________________________________________ 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/