<?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>Miralize.com&#187; Quick Tips  &#8211; Miralize Design</title>
	<atom:link href="http://miralize.com/category/quick-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://miralize.com</link>
	<description>The blog/portfolio of Sean O&#039; Grady</description>
	<lastBuildDate>Tue, 07 Sep 2010 12:31:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Quick Tip #1 &#8211; Clearing Floats without extra Tags</title>
		<link>http://miralize.com/quick-tips/css-tip-1-clearing-floats-without-extra-tags/</link>
		<comments>http://miralize.com/quick-tips/css-tip-1-clearing-floats-without-extra-tags/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 03:21:05 +0000</pubDate>
		<dc:creator>Sean O'Grady</dc:creator>
				<category><![CDATA[Quick Tips]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[followers]]></category>
		<category><![CDATA[good]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://miralize.com/?p=649</guid>
		<description><![CDATA[This is going to be my first CSS snippet. I am going to post a series of both symantic and useful CSS tips. These will be good for both beginners and people who might know CSS already, but are looking for more efficient ways of handling their code. My first tip will be a very [...]]]></description>
			<content:encoded><![CDATA[<p>This is going to be my first CSS snippet. I am going to post a series of both symantic and useful CSS tips. These will be good for both beginners and people who might know CSS already, but are looking for more efficient ways of handling their code. My first tip will be a very useful method of clearing floats in CSS only, without the need for excessive xHTML tags.<br />
<span id="more-649"></span><br />
Here is how the xHTML is marked up</p>
<pre class="brush: xml;">&lt;div id=&quot;container&quot;&gt;

&lt;div id=&quot;columnOne&quot;&gt;Column 1&lt;/div&gt;
&lt;div id=&quot;columnTwo&quot;&gt;Column 2&lt;/div&gt;

&lt;!-- remove this if you have to use the wrong method &lt;br /&gt; --&gt;

&lt;/div&gt;</pre>
<p>Usually you would just have a clearing line break or div to clear them but there is a much simpler solution. My CSS is as follows</p>
<pre class="brush: css;">/* Right Method */

#container {width:960px; overflow:hidden;}

#columnOne {width:660px; float:left;}

#columnTwo {width:300px; float:left;}

/* Wrong Method */

.clear {clear:both;}</pre>
<p>The trick is to set a fixed width on the parent div and have overflow set to hidden. Then your floats will be automatically cleared without using the old method</p>
<h4>Final thoughts</h4>
<p><strong>Pros:</strong></p>
<ul>
<li>No extra markup</li>
<li>More symantic</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>Bad if you need to leave the width automatic</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://miralize.com/quick-tips/css-tip-1-clearing-floats-without-extra-tags/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
