Forum Moderators: open

Message Too Old, No Replies

Conditional statements

Huh?

         

Dabrowski

7:10 pm on Apr 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is there a reference somewhere for these?

I see [if IE] a lot, is there an [if MOZ]?

What are the most common ones?

Fotiman

8:11 pm on Apr 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



These are called "Conditional Comments". They are an IE proprietary feature which lets you target certain IE browsers. Here's the Microsoft page about Conditional Comments:
[msdn.microsoft.com...]

Dabrowski

10:03 pm on Apr 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Cheers. I always wondered why people only used them for IE. Now I know.

coopster

3:38 pm on Apr 19, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



The CSS Forum Library [webmasterworld.com] also has a A Guide to Using Microsoft Conditional Comments [webmasterworld.com] that you might find interesting.

MatthewHSE

12:23 am on Apr 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I always wondered why people only used them for IE. Now I know.

You can also use them to target every browser *except* IE:

[webmasterworld.com...]

Works well if validation isn't vital for you.