<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Float and Clear: A comparison of CSS clearing techniques</title>
	<atom:link href="http://www.dave-woods.co.uk/index.php/float-and-clear-a-comparison-of-css-clearing-techniques/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dave-woods.co.uk/index.php/float-and-clear-a-comparison-of-css-clearing-techniques/</link>
	<description></description>
	<lastBuildDate>Tue, 27 Jul 2010 10:27:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dave Woods - Freelance Web Designer UK &#187; 10 CSS Tips Every Web Developer Should Know</title>
		<link>http://www.dave-woods.co.uk/index.php/float-and-clear-a-comparison-of-css-clearing-techniques/comment-page-1/#comment-20229</link>
		<dc:creator>Dave Woods - Freelance Web Designer UK &#187; 10 CSS Tips Every Web Developer Should Know</dc:creator>
		<pubDate>Wed, 04 Mar 2009 20:58:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.dave-woods.co.uk/?p=133#comment-20229</guid>
		<description>[...] 9. Float and Clear: A Comparison of CSS Clearing Techniques [...]</description>
		<content:encoded><![CDATA[<p>[...] 9. Float and Clear: A Comparison of CSS Clearing Techniques [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Woods - Freelance Web Designer UK &#187; Queen&#8217;s website HTML/CSS Review</title>
		<link>http://www.dave-woods.co.uk/index.php/float-and-clear-a-comparison-of-css-clearing-techniques/comment-page-1/#comment-19564</link>
		<dc:creator>Dave Woods - Freelance Web Designer UK &#187; Queen&#8217;s website HTML/CSS Review</dc:creator>
		<pubDate>Thu, 12 Feb 2009 22:15:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.dave-woods.co.uk/?p=133#comment-19564</guid>
		<description>[...] a really basic principle of CSS to understand clearing floated elements in CSS so again is a little bit surprising to see such basic flaws with the Queen&#8217;s [...]</description>
		<content:encoded><![CDATA[<p>[...] a really basic principle of CSS to understand clearing floated elements in CSS so again is a little bit surprising to see such basic flaws with the Queen&#8217;s [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich</title>
		<link>http://www.dave-woods.co.uk/index.php/float-and-clear-a-comparison-of-css-clearing-techniques/comment-page-1/#comment-1813</link>
		<dc:creator>Rich</dc:creator>
		<pubDate>Mon, 10 Mar 2008 23:34:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.dave-woods.co.uk/?p=133#comment-1813</guid>
		<description>Hey Dave,

Great article, really helped me!

Many thanks,

Rich</description>
		<content:encoded><![CDATA[<p>Hey Dave,</p>
<p>Great article, really helped me!</p>
<p>Many thanks,</p>
<p>Rich</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://www.dave-woods.co.uk/index.php/float-and-clear-a-comparison-of-css-clearing-techniques/comment-page-1/#comment-739</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Fri, 14 Dec 2007 21:42:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.dave-woods.co.uk/?p=133#comment-739</guid>
		<description>I completely agree. It all comes down to personal preference and as long as it doesn&#039;t involve introducing extra markup for the sake of it then it doesn&#039;t really matter which solution you decide to use ;)</description>
		<content:encoded><![CDATA[<p>I completely agree. It all comes down to personal preference and as long as it doesn&#8217;t involve introducing extra markup for the sake of it then it doesn&#8217;t really matter which solution you decide to use <img src='http://www.dave-woods.co.uk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabi Jguma</title>
		<link>http://www.dave-woods.co.uk/index.php/float-and-clear-a-comparison-of-css-clearing-techniques/comment-page-1/#comment-737</link>
		<dc:creator>Gabi Jguma</dc:creator>
		<pubDate>Fri, 14 Dec 2007 16:47:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.dave-woods.co.uk/?p=133#comment-737</guid>
		<description>Dave, indeed, that is another way to do it, but, there might be situations where you just can&#039;t float the parent(or can&#039;t clear the following element), and will have to clear the parent somehow.

Obviously, clearfix does the job in such a situation, and overflow doesn&#039;t!</description>
		<content:encoded><![CDATA[<p>Dave, indeed, that is another way to do it, but, there might be situations where you just can&#8217;t float the parent(or can&#8217;t clear the following element), and will have to clear the parent somehow.</p>
<p>Obviously, clearfix does the job in such a situation, and overflow doesn&#8217;t!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://www.dave-woods.co.uk/index.php/float-and-clear-a-comparison-of-css-clearing-techniques/comment-page-1/#comment-736</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Fri, 14 Dec 2007 16:16:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.dave-woods.co.uk/?p=133#comment-736</guid>
		<description>Thanks for the link Gabi, that makes more sense.

There&#039;s obviously nothing wrong with the way you&#039;ve done that but an alternative would be to float the parent as well and then just clear the float on the content that follows. Here&#039;s an example:

http://www.dave-woods.co.uk/wp-content/uploads/2007/12/overflow.html

There&#039;s lots of different ways of achieving the same thing using CSS though so it&#039;s just about selecting the method you prefer.

Also, I&#039;m obviously just dealing with the code you provided so I understand that this may not work once the rest of the code has been considered but it is another option.

Thanks for your comments :)</description>
		<content:encoded><![CDATA[<p>Thanks for the link Gabi, that makes more sense.</p>
<p>There&#8217;s obviously nothing wrong with the way you&#8217;ve done that but an alternative would be to float the parent as well and then just clear the float on the content that follows. Here&#8217;s an example:</p>
<p><a href="http://www.dave-woods.co.uk/wp-content/uploads/2007/12/overflow.html" rel="nofollow">http://www.dave-woods.co.uk/wp-content/uploads/2007/12/overflow.html</a></p>
<p>There&#8217;s lots of different ways of achieving the same thing using CSS though so it&#8217;s just about selecting the method you prefer.</p>
<p>Also, I&#8217;m obviously just dealing with the code you provided so I understand that this may not work once the rest of the code has been considered but it is another option.</p>
<p>Thanks for your comments <img src='http://www.dave-woods.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabi Jguma</title>
		<link>http://www.dave-woods.co.uk/index.php/float-and-clear-a-comparison-of-css-clearing-techniques/comment-page-1/#comment-735</link>
		<dc:creator>Gabi Jguma</dc:creator>
		<pubDate>Fri, 14 Dec 2007 15:41:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.dave-woods.co.uk/?p=133#comment-735</guid>
		<description>Hey Dave, i was actually working at a project that required clearing, and i put together a simple version of the page, to see what i mean.

One situation where you would need some element to overflow the containing div, would be a tabbed navigation(like the one in the example below.)

You are right that IE6 would frown, but not if you use absolute or relative positioning, and a negative bottom(margin-bottom).

http://www.spine.ro/overflow.html

Check out the code of the example.
It uses clearfix to make the navigation go one pixel below.

Save the page...take out the clearfix class applied to the #header div, and add overflow hidden or auto (delete the x in front of teh rule to activate it), and see what you get.</description>
		<content:encoded><![CDATA[<p>Hey Dave, i was actually working at a project that required clearing, and i put together a simple version of the page, to see what i mean.</p>
<p>One situation where you would need some element to overflow the containing div, would be a tabbed navigation(like the one in the example below.)</p>
<p>You are right that IE6 would frown, but not if you use absolute or relative positioning, and a negative bottom(margin-bottom).</p>
<p><a href="http://www.spine.ro/overflow.html" rel="nofollow">http://www.spine.ro/overflow.html</a></p>
<p>Check out the code of the example.<br />
It uses clearfix to make the navigation go one pixel below.</p>
<p>Save the page&#8230;take out the clearfix class applied to the #header div, and add overflow hidden or auto (delete the x in front of teh rule to activate it), and see what you get.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://www.dave-woods.co.uk/index.php/float-and-clear-a-comparison-of-css-clearing-techniques/comment-page-1/#comment-733</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Fri, 14 Dec 2007 14:23:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.dave-woods.co.uk/?p=133#comment-733</guid>
		<description>Hi Gabi,

I&#039;m not sure of a situation where you&#039;d want overflow at the bottom of a div and if you did this it wouldn&#039;t be supported by IE6 as the box would simply expand and treat height as min-height instead. 

A better solution would be to use a negative top margin on the following element to pull it back in if required but I wouldn&#039;t have thought this was necessary and would need to see an example of the layout that was trying to be achieved as absolute positioning is usually a better solution when things need to overlap rather than relying on any overflow.

Hope that makes sense?</description>
		<content:encoded><![CDATA[<p>Hi Gabi,</p>
<p>I&#8217;m not sure of a situation where you&#8217;d want overflow at the bottom of a div and if you did this it wouldn&#8217;t be supported by IE6 as the box would simply expand and treat height as min-height instead. </p>
<p>A better solution would be to use a negative top margin on the following element to pull it back in if required but I wouldn&#8217;t have thought this was necessary and would need to see an example of the layout that was trying to be achieved as absolute positioning is usually a better solution when things need to overlap rather than relying on any overflow.</p>
<p>Hope that makes sense?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabi Jguma</title>
		<link>http://www.dave-woods.co.uk/index.php/float-and-clear-a-comparison-of-css-clearing-techniques/comment-page-1/#comment-732</link>
		<dc:creator>Gabi Jguma</dc:creator>
		<pubDate>Fri, 14 Dec 2007 12:51:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.dave-woods.co.uk/?p=133#comment-732</guid>
		<description>Dave, indeed, overflow: hidden; should do the trick, and clear the scrollbars ... but   unfortunately, won&#039;t resolve the problem of contained elements that actually need to overflow the div (let&#039;s say you might need an element that will require to stick 1 px out of the bottom of the cleared div) as they will be trimmed (hidden).

Other than that particular situation, i think the technique is safe to use, and is definitely a &quot;lighter&quot;, and more semantically correct and intuitive solution than others.</description>
		<content:encoded><![CDATA[<p>Dave, indeed, overflow: hidden; should do the trick, and clear the scrollbars &#8230; but   unfortunately, won&#8217;t resolve the problem of contained elements that actually need to overflow the div (let&#8217;s say you might need an element that will require to stick 1 px out of the bottom of the cleared div) as they will be trimmed (hidden).</p>
<p>Other than that particular situation, i think the technique is safe to use, and is definitely a &#8220;lighter&#8221;, and more semantically correct and intuitive solution than others.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://www.dave-woods.co.uk/index.php/float-and-clear-a-comparison-of-css-clearing-techniques/comment-page-1/#comment-730</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Fri, 14 Dec 2007 12:32:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.dave-woods.co.uk/?p=133#comment-730</guid>
		<description>Scrollbars will only usually appear if you&#039;ve set a width/height on the container but the floated elements inside this container take up more space.

You could also use overflow: hidden; to the same effect but there is probably an underlying reason why the scrollbars are appearing that I&#039;d personally want to fix.

Feel free to drop me an email (details in the contact section) with some sample code and I&#039;ll be happy to take a look at it for you.</description>
		<content:encoded><![CDATA[<p>Scrollbars will only usually appear if you&#8217;ve set a width/height on the container but the floated elements inside this container take up more space.</p>
<p>You could also use overflow: hidden; to the same effect but there is probably an underlying reason why the scrollbars are appearing that I&#8217;d personally want to fix.</p>
<p>Feel free to drop me an email (details in the contact section) with some sample code and I&#8217;ll be happy to take a look at it for you.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
