snipt

Ctrl+h for KB shortcuts
#35972

CSS

Excluding only a few IE browsers

1
2
3
4
5
This snippet will only show content to browsers IE9 and higher. Of course this will also show all included content to any other non-IE browser.

<!--[if IE]><![if gt IE 8]><![endif]-->
More HTML...
<!--[if IE]><![endif]><![endif]-->
https://snipt.net/embed/0088e43494e39ec0c07f2bd6ba0f6b5f/
https://snipt.net/raw/0088e43494e39ec0c07f2bd6ba0f6b5f/
0088e43494e39ec0c07f2bd6ba0f6b5f
css
CSS
5
2014-04-06T17:18:37
True
False
Jul 18, 2012 at 04:39 AM
/api/public/snipt/35972/
exluding-only-a-few-ie-browsers
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="nt">This</span> <span class="nt">snippet</span> <span class="nt">will</span> <span class="nt">only</span> <span class="nt">show</span> <span class="nt">content</span> <span class="nt">to</span> <span class="nt">browsers</span> <span class="nt">IE9</span> <span class="nt">and</span> <span class="nt">higher</span><span class="o">.</span> <span class="nt">Of</span> <span class="nt">course</span> <span class="nt">this</span> <span class="nt">will</span> <span class="nt">also</span> <span class="nt">show</span> <span class="nt">all</span> <span class="nt">included</span> <span class="nt">content</span> <span class="nt">to</span> <span class="nt">any</span> <span class="nt">other</span> <span class="nt">non-IE</span> <span class="nt">browser</span><span class="o">.</span> </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a><span class="o">&lt;!</span><span class="nt">--</span><span class="o">[</span><span class="nt">if</span> <span class="nt">IE</span><span class="o">]&gt;&lt;![</span><span class="nt">if</span> <span class="nt">gt</span> <span class="nt">IE</span> <span class="nt">8</span><span class="o">]&gt;&lt;![</span><span class="nt">endif</span><span class="o">]</span><span class="nt">--</span><span class="o">&gt;</span> </span><span id="L-4"><a name="L-4"></a><span class="nt">More</span> <span class="nt">HTML</span><span class="o">...</span> </span><span id="L-5"><a name="L-5"></a><span class="o">&lt;!</span><span class="nt">--</span><span class="o">[</span><span class="nt">if</span> <span class="nt">IE</span><span class="o">]&gt;&lt;![</span><span class="nt">endif</span><span class="o">]&gt;&lt;![</span><span class="nt">endif</span><span class="o">]</span><span class="nt">--</span><span class="o">&gt;</span> </span></pre></div> </td></tr></table>
"conditional comments", css, ie