<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Skull Jackpot &#187; float</title>
	<atom:link href="http://skulljackpot.com/tagged-as/float/feed/" rel="self" type="application/rss+xml" />
	<link>http://skulljackpot.com</link>
	<description>Various thoughts of minimal interest to others</description>
	<lastBuildDate>Fri, 25 Feb 2011 16:22:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Design Pattern: Self-clearing floats</title>
		<link>http://skulljackpot.com/2009/01/08/design-pattern-self-clearing-floats/</link>
		<comments>http://skulljackpot.com/2009/01/08/design-pattern-self-clearing-floats/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 21:12:54 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Under the hood]]></category>
		<category><![CDATA[clear]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[float]]></category>
		<category><![CDATA[pattern]]></category>

		<guid isPermaLink="false">http://skulljackpot.com/?p=71</guid>
		<description><![CDATA[An all-CSS solution for clearing floated elements without extraneous markup.]]></description>
			<content:encoded><![CDATA[<p><em>Originally published on the <a href="http://www.openplans.org/projects/topp-design/blog/">TOPP Design Blog</a></em></p>
<h2>Problem Summary</h2>
<p>An element needs to be expanded to contain all child elements, one or more of which may be floated (and thus removed from the normal document flow). ­</p>
<h3>Use When</h3>
<p>The page contains floated elements w­hich should not extend beyond their parent element.</p>
<h3>Solution</h3>
<p>Use self-clearing floats.</p>
<h3>Rationale</h3>
<p>While the &#8220;use a float to contain a float&#8221; approach will ensure that all elements are appropriately contained, it can trigger other renderbugs which this approach avoids.</p>
<h3>Example</h3>
<div> <a href="http://skitch.com/dimmerswitch/bysyi/self-clearing-floats"><img src="http://img.skitch.com/20090109-t87ic6gce86xnudhd8f97che4p.preview.jpg" alt="self-clearing-floats" /></a>
</div>
<h4>CSS</h4>
<pre>.selfclear:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}

.selfclear {
display: inline-block; /* IE 7 */
}

.selfclear {
display: block;
}

* html .selfclear {
height: 1px; /* IE &lt; 7 */
}</pre>
<p><strong>Note</strong>: this method builds upon the approach documented at <a href="http://positioniseverything.net/easyclearing.html">http://positioniseverything.net/easyclearing.html</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://skulljackpot.com/2009/01/08/design-pattern-self-clearing-floats/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.197 seconds -->

