snipt

Ctrl+h for KB shortcuts

HTML

Conditional Comment gt IE7 AND other browsers

1
2
3
4
5
<!--[if gt IE 7]> <!-- -->
Here is some code for anything but IE 7 and below.
<!-- <![endif]-->

<!-- http://stackoverflow.com/questions/10159642/ie-conditional-comments-and-chrome-firefox -->
https://snipt.net/embed/db6ac18b031ce13a7ba94ee1d836a8a9/
/raw/db6ac18b031ce13a7ba94ee1d836a8a9/
db6ac18b031ce13a7ba94ee1d836a8a9
html
HTML
5
2019-07-21T17:08:19
True
False
False
Sep 19, 2013 at 08:27 PM
/api/public/snipt/82064/
conditional-comment-gt-ie7-and-other-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></span><span id="L-1"><a name="L-1"></a><span class="c">&lt;!--[if gt IE 7]&gt; &lt;!-- --&gt;</span> </span><span id="L-2"><a name="L-2"></a>Here is some code for anything but IE 7 and below. </span><span id="L-3"><a name="L-3"></a><span class="c">&lt;!-- &lt;![endif]--&gt;</span> </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a><span class="c">&lt;!-- http://stackoverflow.com/questions/10159642/ie-conditional-comments-and-chrome-firefox --&gt;</span> </span></pre></div> </td></tr></table>
"conditional comments", html, ie

Text only

Breakpoints

1
2
3
960
680
480
https://snipt.net/embed/208e4e6e437c77f0a0b49a2df8c943d3/
/raw/208e4e6e437c77f0a0b49a2df8c943d3/
208e4e6e437c77f0a0b49a2df8c943d3
text
Text only
3
2019-07-21T04:16:28
True
False
False
/api/public/snipt/71529/
breakpoints
<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></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>960 </span><span id="L-2"><a name="L-2"></a>680 </span><span id="L-3"><a name="L-3"></a>480 </span></pre></div> </td></tr></table>
breakpoints, responsive, rwd

CSS

Zebra Stripe a list longer than 3 items

1
2
3
li:first-child:nth-last-child(n+3) ~ li:nth-child(2n-2) {
    background-color: #00f;
}
https://snipt.net/embed/98a93c8fa7e3b2946d490aa5e98db73f/
/raw/98a93c8fa7e3b2946d490aa5e98db73f/
98a93c8fa7e3b2946d490aa5e98db73f
css
CSS
3
2019-07-21T03:40:11
True
False
False
/api/public/snipt/54819/
zebra-stripe-a-list-longer-than-3-items
<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></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nt">li</span><span class="nd">:first-child:nth-last-child</span><span class="o">(</span><span class="nt">n</span><span class="o">+</span><span class="nt">3</span><span class="o">)</span> <span class="o">~</span> <span class="nt">li</span><span class="nd">:nth-child</span><span class="o">(</span><span class="nt">2n-2</span><span class="o">)</span> <span class="p">{</span> </span><span id="L-2"><a name="L-2"></a> <span class="nb">background-color</span><span class="o">:</span> <span class="m">#00f</span><span class="p">;</span> </span><span id="L-3"><a name="L-3"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
css, list, stripe, zebra

CSS

Clearfix

overflow:hidden; _overflow:visible; zoom:1;
https://snipt.net/embed/b36a3353a03722be5068c99fcfe6877c/
/raw/b36a3353a03722be5068c99fcfe6877c/
b36a3353a03722be5068c99fcfe6877c
css
CSS
1
2019-07-21T04:16:47
True
False
False
Sep 13, 2012 at 10:12 AM
/api/public/snipt/47138/
clearfix-21
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nt">overflow</span><span class="nd">:hidden</span><span class="o">;</span> <span class="nt">_overflow</span><span class="nd">:visible</span><span class="o">;</span> <span class="nt">zoom</span><span class="nd">:1</span><span class="o">;</span> </span></pre></div> </td></tr></table>
clearfix, css