<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ReDsgn &#187; conditional comments</title>
	<atom:link href="http://www.redsgn.com/tag/conditional-comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.redsgn.com</link>
	<description>When small things come together great things happen.</description>
	<lastBuildDate>Tue, 10 Nov 2009 04:15:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Damn that IE, how to target Internet Explorer for CSS, Content and Scripts</title>
		<link>http://www.redsgn.com/2009/06/30/damn-that-ie-how-to-target-internet-explorer-for-css-content-and-scripts/</link>
		<comments>http://www.redsgn.com/2009/06/30/damn-that-ie-how-to-target-internet-explorer-for-css-content-and-scripts/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 04:18:15 +0000</pubDate>
		<dc:creator>Paul Boutin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[conditional comments]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.redsgn.com/?p=391</guid>
		<description><![CDATA[We were once sold on the Idea that we needed true CSS hacks to make stuff work in IE we were also sold on browser detection with JavaScript for other content.
Conditional comments can do more than allow you to serve up different CSS for specific versions you can use conditional comments for just about any type of content you want to exclude or include for various versions. Conditional comments work in IE versions 5 and newer. You can be as specific as you need to like IE 5.01 and 5.5.]]></description>
			<content:encoded><![CDATA[<p>We were once sold on the Idea that we needed true CSS hacks to make stuff work in IE we were also sold on browser detection with JavaScript for other content.</p>
<p>I have been using conditional comments for years now and this may seem like old news to some, To others this is refresher.</p>
<p>Conditional comments can do more than allow you to serve up different CSS for specific versions you can use conditional comments for just about any type of content you want to exclude or include for various versions. Conditional comments work in IE versions 5 and newer. You can be as specific as you need to like IE 5.01 and 5.5.<span id="more-391"></span></p>
<p>The syntax is simple&#8230;<br />
&lt;!- -[if IE 6]&gt;<br />
Special instructions for IE 6 here<br />
&lt;![endif]- -&gt;<br />
Variations are as follows&#8230;<br />
[if IE]<br />
[if IE 7]<br />
[if gte IE 5]<br />
[if lt IE 6]<br />
[if lte IE 5.5]<br />
[if gt IE 6]<br />
[if !IE]<br />
[if !(IE 7)]<br />
[if (gt IE 5)&amp;(lt IE 7)]<br />
[if (IE 6)|(IE 7)]</p>
<p>All standard comments are wrapped in &lt;!- &#8211; and &#8211; -&gt;<br />
All conditional comments fall within a standard comment and have an if block wrapped in square brackets [if ] [endif]</p>
<ul>
<li>!: not equal</li>
<li>&amp;: and</li>
<li>|: or</li>
<li>gt: greater than</li>
<li>gte: greater than or equal to</li>
<li>lt: less than</li>
<li>lte: less than or equal to</li>
</ul>
<p>They are just comments to all other browsers and just like comments they can be anywhere comments can be&#8230; in the Head or body. Places these comments don&#8217;t work are inside CSS files or script files.</p>
<p>to server up diff CSS for IE you can either use embedded CSS as in &lt;style type=&#8221;text/css&#8221;&gt;&lt;/style&gt; or link to an external CSS file as in &lt;link type=&#8221;text/css&#8221; rel=&#8221;stylesheet&#8221; media=&#8221;all&#8221; href=&#8221;#&#8221; /&gt;</p>
<p>Same for script files&#8230;<br />
&lt;script type=&#8221;text/javascript&#8221;&gt;&lt;/script&gt; or &lt;script type=&#8221;text/javascript&#8221; src=&#8221;#&#8221;&gt;&lt;/script&gt;</p>
<p>IE also has a JScript version of this for using inside JavaScript files.</p>
<p>/*@cc_on @*/<br />
/*@if (@_win32)<br />
IE specific JavaScript goes here.<br />
/*@end @*/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redsgn.com/2009/06/30/damn-that-ie-how-to-target-internet-explorer-for-css-content-and-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
