View Full Version : Conditional comments - help!

07-06-2012, 03:00 PM
Hi everyone,

This may be a silly questions, since I'm relatively new to web development.
However, I need to use conditional comments in order to display different css files depending upon the browser. I've done this and it works fine when I preview it in the browser. However, my client wants to be able to see the actual layout of the page (the css, etc) when she's editing content in Dreamweaver in the design view. Since conditional comments are - from what I understand - recognized by Dreamweaver as comments themselves, the template obviously does not show in the design view. Is there any solution to this? When I remove the conditional comments everything displays fine, but I can't very well ask my client to remove and add the comments back every time she wants to edit.

Thanks so much!

07-06-2012, 03:44 PM
This extension might be old, not sure, but it should enable support in DW for IE conditional statements:

07-06-2012, 06:03 PM
You're a life saver. It works perfectly. Thank you so much. ^_^

07-18-2012, 10:27 AM
conditional comments are being dropped in IE10 along with a number of other IE-specific features.

07-18-2012, 10:34 AM
I forgot to mention that there is a meta tag you can include to drop ie10 back to simulating ie9.
IE Conditional Comments (http://msdn.microsoft.com/en-us/library/ms537512%28v=vs.85%29.aspx)

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />