snipt

Ctrl+h for KB shortcuts
#36358

CSS

horizontal rule margin not collapsing

1
2
3
4
5
hr{
    border:0; padding:0px; margin:20px 0; 
    background:#eee7e5; border-top:1px solid #eee7e5; 
    width:100%; float:left; clear:left;
}
https://snipt.net/embed/3d4315e7bef47c21071b3de6dc9d5190/
https://snipt.net/raw/3d4315e7bef47c21071b3de6dc9d5190/
3d4315e7bef47c21071b3de6dc9d5190
css
CSS
5
2014-04-17T07:02:27
True
False
/api/public/snipt/36358/
horizontal-rule-margin-not-collapsing
<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">hr</span><span class="p">{</span> </span><span id="L-2"><a name="L-2"></a> <span class="k">border</span><span class="o">:</span><span class="m">0</span><span class="p">;</span> <span class="k">padding</span><span class="o">:</span><span class="m">0px</span><span class="p">;</span> <span class="k">margin</span><span class="o">:</span><span class="m">20px</span> <span class="m">0</span><span class="p">;</span> </span><span id="L-3"><a name="L-3"></a> <span class="k">background</span><span class="o">:</span><span class="m">#eee7e5</span><span class="p">;</span> <span class="k">border-top</span><span class="o">:</span><span class="m">1px</span> <span class="k">solid</span> <span class="m">#eee7e5</span><span class="p">;</span> </span><span id="L-4"><a name="L-4"></a> <span class="k">width</span><span class="o">:</span><span class="m">100</span><span class="o">%</span><span class="p">;</span> <span class="k">float</span><span class="o">:</span><span class="k">left</span><span class="p">;</span> <span class="k">clear</span><span class="o">:</span><span class="k">left</span><span class="p">;</span> </span><span id="L-5"><a name="L-5"></a><span class="p">}</span> </span></pre></div> </td></tr></table>
css, hr, html