Snipt.net is closing on December 31st, 2016

For more information, please visit this blog post.

snipt

Ctrl+h for KB shortcuts

CSS

LightBox 2 en Foundation

1
2
3
.lb-image{
	max-width:inherit;
}
https://snipt.net/embed/702f5f77c5ff8b8b185e18ef801b5734/
https://snipt.net/raw/702f5f77c5ff8b8b185e18ef801b5734/
702f5f77c5ff8b8b185e18ef801b5734
css
CSS
3
2016-12-05T06:29:02
True
False
False
Feb 25, 2014 at 03:53 AM
/api/public/snipt/116539/
lightbox-2-en-foundation
<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="nc">.lb-image</span><span class="p">{</span> </span><span id="L-2"><a name="L-2"></a> <span class="nb">max-width</span><span class="o">:</span><span class="nb">inherit</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, foundation, hack-css, lightbox2, trick

CSS

Foundation: Block Grid Collapse

1
2
3
4
5
6
7
ul.small-block-grid-1.collapse li, ul.small-block-grid-2.collapse li, ul.small-block-grid-3.collapse li, ul.small-block-grid-4.collapse li, ul.small-block-grid-5.collapse li, ul.small-block-grid-6.collapse li, ul.small-block-grid-7.collapse li, ul.small-block-grid-8.collapse li, ul.large-block-grid-1.collapse li, ul.large-block-grid-2.collapse li, ul.large-block-grid-3.collapse li, ul.large-block-grid-4.collapse li, ul.large-block-grid-5.collapse li, ul.large-block-grid-6.collapse li, ul.large-block-grid-7.collapse li, ul.large-block-grid-8.collapse li{ 
	padding: 0; 
	border-right: 1px solid #F2F2F2;
}
ul.small-block-grid-1.collapse li:last-child, ul.small-block-grid-2.collapse li:last-child, ul.small-block-grid-3.collapse li:last-child, ul.small-block-grid-4.collapse li:last-child, ul.small-block-grid-5.collapse li:last-child, ul.small-block-grid-6.collapse li:last-child, ul.small-block-grid-7.collapse li:last-child, ul.small-block-grid-8.collapse li:last-child, ul.large-block-grid-1.collapse li:last-child, ul.large-block-grid-2.collapse li:last-child, ul.large-block-grid-3.collapse li:last-child, ul.large-block-grid-4.collapse li:last-child, ul.large-block-grid-5.collapse li:last-child, ul.large-block-grid-6.collapse li:last-child, ul.large-block-grid-7.collapse li:last-child, ul.large-block-grid-8.collapse li:last-child{
	border-right:none;
}
https://snipt.net/embed/840dc86a172419ac96fc208e9a222934/
https://snipt.net/raw/840dc86a172419ac96fc208e9a222934/
840dc86a172419ac96fc208e9a222934
css
CSS
7
2016-12-09T14:32:11
True
False
False
Feb 01, 2014 at 10:37 PM
/api/public/snipt/110217/
foundation-block-grid-collapse
<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> <a href="#L-6">6</a> <a href="#L-7">7</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">ul</span><span class="nc">.small-block-grid-1.collapse</span> <span class="nt">li</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.small-block-grid-2.collapse</span> <span class="nt">li</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.small-block-grid-3.collapse</span> <span class="nt">li</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.small-block-grid-4.collapse</span> <span class="nt">li</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.small-block-grid-5.collapse</span> <span class="nt">li</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.small-block-grid-6.collapse</span> <span class="nt">li</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.small-block-grid-7.collapse</span> <span class="nt">li</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.small-block-grid-8.collapse</span> <span class="nt">li</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.large-block-grid-1.collapse</span> <span class="nt">li</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.large-block-grid-2.collapse</span> <span class="nt">li</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.large-block-grid-3.collapse</span> <span class="nt">li</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.large-block-grid-4.collapse</span> <span class="nt">li</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.large-block-grid-5.collapse</span> <span class="nt">li</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.large-block-grid-6.collapse</span> <span class="nt">li</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.large-block-grid-7.collapse</span> <span class="nt">li</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.large-block-grid-8.collapse</span> <span class="nt">li</span><span class="p">{</span> </span><span id="L-2"><a name="L-2"></a> <span class="nb">padding</span><span class="o">:</span> <span class="m">0</span><span class="p">;</span> </span><span id="L-3"><a name="L-3"></a> <span class="nb">border-right</span><span class="o">:</span> <span class="m">1px</span> <span class="nb">solid</span> <span class="m">#F2F2F2</span><span class="p">;</span> </span><span id="L-4"><a name="L-4"></a><span class="p">}</span> </span><span id="L-5"><a name="L-5"></a><span class="nt">ul</span><span class="nc">.small-block-grid-1.collapse</span> <span class="nt">li</span><span class="nd">:last-child</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.small-block-grid-2.collapse</span> <span class="nt">li</span><span class="nd">:last-child</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.small-block-grid-3.collapse</span> <span class="nt">li</span><span class="nd">:last-child</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.small-block-grid-4.collapse</span> <span class="nt">li</span><span class="nd">:last-child</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.small-block-grid-5.collapse</span> <span class="nt">li</span><span class="nd">:last-child</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.small-block-grid-6.collapse</span> <span class="nt">li</span><span class="nd">:last-child</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.small-block-grid-7.collapse</span> <span class="nt">li</span><span class="nd">:last-child</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.small-block-grid-8.collapse</span> <span class="nt">li</span><span class="nd">:last-child</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.large-block-grid-1.collapse</span> <span class="nt">li</span><span class="nd">:last-child</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.large-block-grid-2.collapse</span> <span class="nt">li</span><span class="nd">:last-child</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.large-block-grid-3.collapse</span> <span class="nt">li</span><span class="nd">:last-child</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.large-block-grid-4.collapse</span> <span class="nt">li</span><span class="nd">:last-child</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.large-block-grid-5.collapse</span> <span class="nt">li</span><span class="nd">:last-child</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.large-block-grid-6.collapse</span> <span class="nt">li</span><span class="nd">:last-child</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.large-block-grid-7.collapse</span> <span class="nt">li</span><span class="nd">:last-child</span><span class="o">,</span> <span class="nt">ul</span><span class="nc">.large-block-grid-8.collapse</span> <span class="nt">li</span><span class="nd">:last-child</span><span class="p">{</span> </span><span id="L-6"><a name="L-6"></a> <span class="nb">border-right</span><span class="o">:</span><span class="nb">none</span><span class="p">;</span> </span><span id="L-7"><a name="L-7"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
"block grid", css, foundation

HTML

Foundation 4 - Block Grids

1
2
3
4
5
6
7
<!-- Block grid syntax for Foundation 4 -->
<ul class="small-block-grid-2 large-block-grid-4">
  <li><img src="path/to/image"></li>
  <li><img src="path/to/image"></li>
  <li><img src="path/to/image"></li>
  <li><img src="path/to/image"></li>
</ul>
https://snipt.net/embed/47272083a92f7db966f65deeac9a6ee4/
https://snipt.net/raw/47272083a92f7db966f65deeac9a6ee4/
47272083a92f7db966f65deeac9a6ee4
html
HTML
7
2016-12-09T15:02:04
True
False
False
/api/public/snipt/66182/
foundation-4-block-grids
<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> <a href="#L-6">6</a> <a href="#L-7">7</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;!-- Block grid syntax for Foundation 4 --&gt;</span> </span><span id="L-2"><a name="L-2"></a><span class="p">&lt;</span><span class="nt">ul</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;small-block-grid-2 large-block-grid-4&quot;</span><span class="p">&gt;</span> </span><span id="L-3"><a name="L-3"></a> <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;&lt;</span><span class="nt">img</span> <span class="na">src</span><span class="o">=</span><span class="s">&quot;path/to/image&quot;</span><span class="p">&gt;&lt;/</span><span class="nt">li</span><span class="p">&gt;</span> </span><span id="L-4"><a name="L-4"></a> <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;&lt;</span><span class="nt">img</span> <span class="na">src</span><span class="o">=</span><span class="s">&quot;path/to/image&quot;</span><span class="p">&gt;&lt;/</span><span class="nt">li</span><span class="p">&gt;</span> </span><span id="L-5"><a name="L-5"></a> <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;&lt;</span><span class="nt">img</span> <span class="na">src</span><span class="o">=</span><span class="s">&quot;path/to/image&quot;</span><span class="p">&gt;&lt;/</span><span class="nt">li</span><span class="p">&gt;</span> </span><span id="L-6"><a name="L-6"></a> <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;&lt;</span><span class="nt">img</span> <span class="na">src</span><span class="o">=</span><span class="s">&quot;path/to/image&quot;</span><span class="p">&gt;&lt;/</span><span class="nt">li</span><span class="p">&gt;</span> </span><span id="L-7"><a name="L-7"></a><span class="p">&lt;/</span><span class="nt">ul</span><span class="p">&gt;</span> </span></pre></div> </td></tr></table>
foundation, grid

PHP

SubNav

1
2
3
4
5
6
7
8
<?php
$this -> widget("foundation.widgets.FounSubNav", array('title' => 'Filter:', 'items' => array(
    array('label' => 'All', 'active' => true),
    array('label' => 'Active'),
    array('label' => 'Pending'),
    array('label' => 'Suspended'),
)));
?>
https://snipt.net/embed/53b2d352410d714bca5958a7669c6c6a/
https://snipt.net/raw/53b2d352410d714bca5958a7669c6c6a/
53b2d352410d714bca5958a7669c6c6a
php
PHP
8
2016-12-06T20:29:17
True
False
False
/api/public/snipt/38950/
subnav-3
<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> <a href="#L-6">6</a> <a href="#L-7">7</a> <a href="#L-8">8</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> </span><span id="L-2"><a name="L-2"></a><span class="nv">$this</span> <span class="o">-&gt;</span> <span class="na">widget</span><span class="p">(</span><span class="s2">&quot;foundation.widgets.FounSubNav&quot;</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span><span class="s1">&#39;title&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;Filter:&#39;</span><span class="p">,</span> <span class="s1">&#39;items&#39;</span> <span class="o">=&gt;</span> <span class="k">array</span><span class="p">(</span> </span><span id="L-3"><a name="L-3"></a> <span class="k">array</span><span class="p">(</span><span class="s1">&#39;label&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;All&#39;</span><span class="p">,</span> <span class="s1">&#39;active&#39;</span> <span class="o">=&gt;</span> <span class="k">true</span><span class="p">),</span> </span><span id="L-4"><a name="L-4"></a> <span class="k">array</span><span class="p">(</span><span class="s1">&#39;label&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;Active&#39;</span><span class="p">),</span> </span><span id="L-5"><a name="L-5"></a> <span class="k">array</span><span class="p">(</span><span class="s1">&#39;label&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;Pending&#39;</span><span class="p">),</span> </span><span id="L-6"><a name="L-6"></a> <span class="k">array</span><span class="p">(</span><span class="s1">&#39;label&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;Suspended&#39;</span><span class="p">),</span> </span><span id="L-7"><a name="L-7"></a><span class="p">)));</span> </span><span id="L-8"><a name="L-8"></a><span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
foundation, ui, yii

PHP

Nav with inputs

1
2
3
4
5
6
<?php
$this -> widget("foundation.widgets.FounNavBar", array('items' => array(
CHtml::textField("search"),
array('label' => 'Nav Element', 'flyout' => 'content...'),
)));
?>
https://snipt.net/embed/b05d3464cc763fdca9b71bbaffb610e8/
https://snipt.net/raw/b05d3464cc763fdca9b71bbaffb610e8/
b05d3464cc763fdca9b71bbaffb610e8
php
PHP
6
2016-12-06T20:29:58
True
False
False
/api/public/snipt/38949/
-73
<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> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> </span><span id="L-2"><a name="L-2"></a><span class="nv">$this</span> <span class="o">-&gt;</span> <span class="na">widget</span><span class="p">(</span><span class="s2">&quot;foundation.widgets.FounNavBar&quot;</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span><span class="s1">&#39;items&#39;</span> <span class="o">=&gt;</span> <span class="k">array</span><span class="p">(</span> </span><span id="L-3"><a name="L-3"></a><span class="nx">CHtml</span><span class="o">::</span><span class="na">textField</span><span class="p">(</span><span class="s2">&quot;search&quot;</span><span class="p">),</span> </span><span id="L-4"><a name="L-4"></a><span class="k">array</span><span class="p">(</span><span class="s1">&#39;label&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;Nav Element&#39;</span><span class="p">,</span> <span class="s1">&#39;flyout&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;content...&#39;</span><span class="p">),</span> </span><span id="L-5"><a name="L-5"></a><span class="p">)));</span> </span><span id="L-6"><a name="L-6"></a><span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
foundation, ui, yii
Copyrighted, illegal, or inappropriate content? Email [email protected].