snipt

Ctrl+h for KB shortcuts

PHP

Get the image URL for a specific image_style

<?php image_style_url('thumbnail', $uri) ?>
https://snipt.net/embed/79ca6c28b3362828e1a94a4ab5a3f967/
https://snipt.net/raw/79ca6c28b3362828e1a94a4ab5a3f967/
79ca6c28b3362828e1a94a4ab5a3f967
php
PHP
1
2016-09-25T12:54:13
True
False
False
Oct 12, 2012 at 09:47 AM
/api/public/snipt/47980/
get-the-image-url-for-a-specific-image_style
<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 id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> <span class="nx">image_style_url</span><span class="p">(</span><span class="s1">&#39;thumbnail&#39;</span><span class="p">,</span> <span class="nv">$uri</span><span class="p">)</span> <span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
"drupal 7", image, image_style, style, uri, url

JavaScript

Delete all inline stylying in a page with jQuery

$("*[style]").attr("style", "");
https://snipt.net/embed/cc6cdcc993c7e8b52990bc10a3c85874/
https://snipt.net/raw/cc6cdcc993c7e8b52990bc10a3c85874/
cc6cdcc993c7e8b52990bc10a3c85874
js
JavaScript
1
2016-09-22T21:18:01
True
False
False
Jan 27, 2014 at 02:34 AM
/api/public/snipt/42679/
delete-all-inline-stylying-in-a-page-with-jquery
<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 id="L-1"><a name="L-1"></a><span class="nx">$</span><span class="p">(</span><span class="s2">&quot;*[style]&quot;</span><span class="p">).</span><span class="nx">attr</span><span class="p">(</span><span class="s2">&quot;style&quot;</span><span class="p">,</span> <span class="s2">&quot;&quot;</span><span class="p">);</span> </span></pre></div> </td></tr></table>
css, inline, jquery, js, style

CSS

minheight in IE6

1
2
3
4
5
6
.with_minheight
{
    min-height:550px;
    height:auto !important;
    height:550px;
}
https://snipt.net/embed/74074d72e13f3874eddaac73611fe80a/
https://snipt.net/raw/74074d72e13f3874eddaac73611fe80a/
74074d72e13f3874eddaac73611fe80a
css
CSS
6
2016-09-27T21:09:47
True
False
False
/api/public/snipt/22437/
minheight-in-ie6
<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 id="L-1"><a name="L-1"></a><span class="nc">.with_minheight</span> </span><span id="L-2"><a name="L-2"></a><span class="p">{</span> </span><span id="L-3"><a name="L-3"></a> <span class="k">min-height</span><span class="o">:</span><span class="m">550px</span><span class="p">;</span> </span><span id="L-4"><a name="L-4"></a> <span class="k">height</span><span class="o">:</span><span class="k">auto</span> <span class="cp">!important</span><span class="p">;</span> </span><span id="L-5"><a name="L-5"></a> <span class="k">height</span><span class="o">:</span><span class="m">550px</span><span class="p">;</span> </span><span id="L-6"><a name="L-6"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
css, hack, stupid-frakking-ie, style
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.