<?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"
	>
<channel>
	<title>Comments on: CSS: Weird margin-top CSS bug? I think?</title>
	<atom:link href="http://www.bitsandpix.com/entry/css-weird-margin-top-css-bug-i-think/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bitsandpix.com/entry/css-weird-margin-top-css-bug-i-think/</link>
	<description>No Buzz, just Code, Design, and Sys-Admin stuff.</description>
	<pubDate>Sat, 19 May 2012 02:20:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Andrew Mabbott</title>
		<link>http://www.bitsandpix.com/entry/css-weird-margin-top-css-bug-i-think/#comment-615</link>
		<dc:creator>Andrew Mabbott</dc:creator>
		<pubDate>Fri, 24 Apr 2009 11:53:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.bitsandpix.com/?p=312#comment-615</guid>
		<description>This has been causing me a real headache so it's good to see some explanation and to find out that CSS margin collapsing is what I need to read up on!

I understand why it would be useful for margin to collapse on adjacent elements but I'm still confused as to why it makes sense for parent elements to inghrit child margins like this.

Also, from my testing it doesn't seem to extend up to the body element - surely if the outer div is directly inside the body element and the body has no margin, then the body should inherit margin from the inner div??

Incidentally, I noticed that IE&#60;=7 doesn't render this properly but that MS have fixed this in IE8 - hopefully another sign of IE's increased convergence with the other browsers.</description>
		<content:encoded><![CDATA[<p>This has been causing me a real headache so it&#8217;s good to see some explanation and to find out that CSS margin collapsing is what I need to read up on!</p>
<p>I understand why it would be useful for margin to collapse on adjacent elements but I&#8217;m still confused as to why it makes sense for parent elements to inghrit child margins like this.</p>
<p>Also, from my testing it doesn&#8217;t seem to extend up to the body element - surely if the outer div is directly inside the body element and the body has no margin, then the body should inherit margin from the inner div??</p>
<p>Incidentally, I noticed that IE&lt;=7 doesn&#8217;t render this properly but that MS have fixed this in IE8 - hopefully another sign of IE&#8217;s increased convergence with the other browsers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Onsitus</title>
		<link>http://www.bitsandpix.com/entry/css-weird-margin-top-css-bug-i-think/#comment-591</link>
		<dc:creator>Onsitus</dc:creator>
		<pubDate>Wed, 22 Apr 2009 06:47:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.bitsandpix.com/?p=312#comment-591</guid>
		<description>Ciao, I done some testing yesterday (also wrote an article on the argument - haven't done yet the traduction in english though).
Other solutions: using position:absolute; or il float left/right or overflow:hidden;</description>
		<content:encoded><![CDATA[<p>Ciao, I done some testing yesterday (also wrote an article on the argument - haven&#8217;t done yet the traduction in english though).<br />
Other solutions: using position:absolute; or il float left/right or overflow:hidden;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jeremychone</title>
		<link>http://www.bitsandpix.com/entry/css-weird-margin-top-css-bug-i-think/#comment-589</link>
		<dc:creator>jeremychone</dc:creator>
		<pubDate>Tue, 21 Apr 2009 18:05:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.bitsandpix.com/?p=312#comment-589</guid>
		<description>Tx Onsitus, yes, I think you are right, it is "unfortunately" not a bug. I understand better the rational, but the problem with padding is that it is not as consistent across browser (i.e. IE 7). Thanks for dropping by.</description>
		<content:encoded><![CDATA[<p>Tx Onsitus, yes, I think you are right, it is &#8220;unfortunately&#8221; not a bug. I understand better the rational, but the problem with padding is that it is not as consistent across browser (i.e. IE 7). Thanks for dropping by.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Onsitus</title>
		<link>http://www.bitsandpix.com/entry/css-weird-margin-top-css-bug-i-think/#comment-587</link>
		<dc:creator>Onsitus</dc:creator>
		<pubDate>Tue, 21 Apr 2009 07:20:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.bitsandpix.com/?p=312#comment-587</guid>
		<description>Ciao, I got there as I saw that you linked to our site (from Flepstudio I am).  I don't think that this is a bug but due to the margin collapsing, 2 margin-top which touch each other (same thing for margin-bottom it should be.  It does not sum up the total of the margin but apply the biggest value to the most 'outside' element.  If you add content to the blu div (before the red one), the margin-top are not in contact anymore and their value are respected. An easy solution would be to apply a padding-top or border-top to the main div (the blue one) of one px so to create a space in between the 2 top margin and avoid the collapsing. :)</description>
		<content:encoded><![CDATA[<p>Ciao, I got there as I saw that you linked to our site (from Flepstudio I am).  I don&#8217;t think that this is a bug but due to the margin collapsing, 2 margin-top which touch each other (same thing for margin-bottom it should be.  It does not sum up the total of the margin but apply the biggest value to the most &#8216;outside&#8217; element.  If you add content to the blu div (before the red one), the margin-top are not in contact anymore and their value are respected. An easy solution would be to apply a padding-top or border-top to the main div (the blue one) of one px so to create a space in between the 2 top margin and avoid the collapsing. <img src='http://www.bitsandpix.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jeremychone</title>
		<link>http://www.bitsandpix.com/entry/css-weird-margin-top-css-bug-i-think/#comment-244</link>
		<dc:creator>jeremychone</dc:creator>
		<pubDate>Mon, 02 Mar 2009 15:47:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.bitsandpix.com/?p=312#comment-244</guid>
		<description>@Dan thanks for looking at it. I will add more example this week.</description>
		<content:encoded><![CDATA[<p>@Dan thanks for looking at it. I will add more example this week.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Ott</title>
		<link>http://www.bitsandpix.com/entry/css-weird-margin-top-css-bug-i-think/#comment-214</link>
		<dc:creator>Dan Ott</dc:creator>
		<pubDate>Fri, 27 Feb 2009 19:01:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.bitsandpix.com/?p=312#comment-214</guid>
		<description>Jeremy -

I don't see it in FF 3. Looking at it in firebug, it appears the margin is applied correctly. Is there more markup/styling to this example? That might help clarify the issue more.</description>
		<content:encoded><![CDATA[<p>Jeremy -</p>
<p>I don&#8217;t see it in FF 3. Looking at it in firebug, it appears the margin is applied correctly. Is there more markup/styling to this example? That might help clarify the issue more.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

