<?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>digitalRenewal &#187; css clearing floats</title>
	<atom:link href="http://digitalrenewal.com/tag/css-clearing-floats/feed" rel="self" type="application/rss+xml" />
	<link>http://digitalrenewal.com</link>
	<description>like a breath of fresh air</description>
	<lastBuildDate>Tue, 10 Jan 2012 03:36:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Clearing Floats in CSS</title>
		<link>http://digitalrenewal.com/clearing-floats-in-css</link>
		<comments>http://digitalrenewal.com/clearing-floats-in-css#comments</comments>
		<pubDate>Sun, 13 Dec 2009 04:12:17 +0000</pubDate>
		<dc:creator>Trisha</dc:creator>
				<category><![CDATA[Web Design Tutorials]]></category>
		<category><![CDATA[css clearing floats]]></category>
		<category><![CDATA[css codes]]></category>
		<category><![CDATA[css examples]]></category>
		<category><![CDATA[css tutorial]]></category>

		<guid isPermaLink="false">http://digitalrenewal.com/?p=546</guid>
		<description><![CDATA[What I learned from SmashingMagazine. Even after a year of coding with only CSS, I was ready to sit down and relearn floats. There had to be something I was missing. CSS columns just didnt work. After reading Smashing Magazine, I was surprised at how SIMPLE the fix is. Two little words were the key to ending my frustration. ]]></description>
			<content:encoded><![CDATA[<p><a href="http://digitalrenewal.com/clearing-floats-in-css/postit-clearingfloats" rel="attachment wp-att-974"><img class="alignright size-full wp-image-974 colorbox-546" title="clearing floats in css" src="http://digitalrenewal.com/wp-content/uploads/postit-clearingfloats.png" alt="clearing floats in css" width="312" height="342" /></a>This one was long overdue. Even after a year of coding with only CSS, I was ready to sit down and relearn floats. There had to be something I was missing. It just didnt work. Since the default behavior of a div is to stack on top of each other, they must be floated, so they behave like table columns. The problem arises after the float. The float must be cleared somehow or the info below runs right into the columns. After reading Smashing Magazines article on <a href="http://www.smashingmagazine.com/2009/10/19/the-mystery-of-css-float-property/comment-page-1/#comment-419689" target="_blank">CSS Floats</a> I was surprised at how SIMPLE the fix is. One little word was the key to ending my frustration. overflow. remember them well. You can use overflow:hidden, overflow:auto, or overflow:visible&#8230; play around with it to see what each does.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div style=&quot;overflow: auto; width: 100%;&quot;&gt;
&lt;div style=&quot;float: left; width: 20%;&quot;&gt;Left&lt;/div&gt;
&lt;div style=&quot;float: left;&quot;&gt;Content&lt;/div&gt;
&lt;div style=&quot;float: right; width: 10%;&quot;&gt;Right&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;footer&lt;/div&gt;
</pre>
<p>Heres the result:</p>
<div style="overflow: auto; width: 100%;">
<div style="float: left; width: 20%;">Left</div>
<div style="float: left;">Content</div>
<div style="float: right; width: 10%;">Right</div>
</div>
<div>footer</div>
<p>And with little extra styling:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div style=&quot;background: #ffffff; overflow: auto; width: 100%;&quot;&gt;
&lt;div style=&quot;float: left; padding: 1%; background: #cccccc; width: 20%;&quot;&gt;Left&lt;/div&gt;
&lt;div style=&quot;float: left; padding: 1%;&quot;&gt;Content&lt;/div&gt;
&lt;div style=&quot;float: right; padding: 1%; background: #555555; width: 10%;&quot;&gt;Right&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background: #333333; color: white; text-align: center;&quot;&gt;footer&lt;/div&gt;
</pre>
<p>Heres the result:</p>
<div style="background: #ffffff; overflow: auto; width: 100%;">
<div style="float: left; padding: 1%; background: #cccccc; width: 20%;">Left</div>
<div style="float: left; padding: 1%;">Content</div>
<div style="float: right; padding: 1%; background: #555555; width: 10%;">Right</div>
</div>
<div style="background: #333333; color: white; text-align: center;">footer</div>
<p>Happy CSSing!</p>
]]></content:encoded>
			<wfw:commentRss>http://digitalrenewal.com/clearing-floats-in-css/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

