Return to Snippet

Revision: 34197
at October 19, 2010 06:24 by rumremix


Initial Code
Use 

<SharePoint:CSSRegistration Name="foo.css" ConditionalExpression="gte IE 7" runat="server" />

Instead of 

<!--[if gte IE 7]>
<link rel="stylesheet" type="text/css" href="foo.css"/>
<![endif]-->


The former will generate the latter when the page is rendered.

Initial URL


Initial Description
We discovered that conditional comments don’t always work so well in SP2010. Instead, it is necessary to use a SP control. Below is the correct syntax.

Initial Title
CSS Conditional Comments in SharePoint 2010

Initial Tags


Initial Language
CSS