<?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: Where&#8217;s My Margin Gone? (or why 1+1=1)</title>
	<atom:link href="http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/</link>
	<description>Internet Marketing, Website Promotion and Blogging Advice</description>
	<lastBuildDate>Sun, 29 Jan 2012 02:18:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Paul OB</title>
		<link>http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/comment-page-1/#comment-142251</link>
		<dc:creator>Paul OB</dc:creator>
		<pubDate>Mon, 18 May 2009 08:19:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/#comment-142251</guid>
		<description>Hi JohnM,

Collapsing margins apply to nested elements also and not just to adjacent elements. (vertical margins on inline elements do not apply anyway)

If you have a p element nested inside a div and there is no borders padding or content between the edges of the nested element then the vertical margin on the p element effectively collapses onto the outer element and becomes a margin on the div instead.

For example if the p element had a top margin of 1em it would not move the p element 1 em away from the parent div but would actually move the parent div 1em away from whatever was above it (assuming there were no more margin collapses above).

Try out the demos above to see this in action :)</description>
		<content:encoded><![CDATA[<p>Hi JohnM,</p>
<p>Collapsing margins apply to nested elements also and not just to adjacent elements. (vertical margins on inline elements do not apply anyway)</p>
<p>If you have a p element nested inside a div and there is no borders padding or content between the edges of the nested element then the vertical margin on the p element effectively collapses onto the outer element and becomes a margin on the div instead.</p>
<p>For example if the p element had a top margin of 1em it would not move the p element 1 em away from the parent div but would actually move the parent div 1em away from whatever was above it (assuming there were no more margin collapses above).</p>
<p>Try out the demos above to see this in action <img src='http://www.search-this.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JohnM</title>
		<link>http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/comment-page-1/#comment-142189</link>
		<dc:creator>JohnM</dc:creator>
		<pubDate>Sun, 17 May 2009 22:40:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/#comment-142189</guid>
		<description>I thought both the div and the p tag are block elements so that the margin of the nested p tag is not even touching the margin of the div in the first place because the p element is actually inside the div element. So why do you even need to add a pixel of border or padding when their not even touching in the first place?</description>
		<content:encoded><![CDATA[<p>I thought both the div and the p tag are block elements so that the margin of the nested p tag is not even touching the margin of the div in the first place because the p element is actually inside the div element. So why do you even need to add a pixel of border or padding when their not even touching in the first place?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Let&#8217;s Be Clear About This!</title>
		<link>http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/comment-page-1/#comment-17905</link>
		<dc:creator>Let&#8217;s Be Clear About This!</dc:creator>
		<pubDate>Wed, 05 Sep 2007 13:45:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/#comment-17905</guid>
		<description>[...] it, then the parent container will be the margin&#039;s starting point (you must also take into account collapsing margins of [...]</description>
		<content:encoded><![CDATA[<p>[...] it, then the parent container will be the margin&#8217;s starting point (you must also take into account collapsing margins of [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul OB</title>
		<link>http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/comment-page-1/#comment-14701</link>
		<dc:creator>Paul OB</dc:creator>
		<pubDate>Wed, 08 Aug 2007 08:23:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/#comment-14701</guid>
		<description>Hi Chris,

Thanks for your comments and I have to agree that margin collapse works against us most of the times and would possibly be easier to handle if margins didn&#039;t collapse at all.

Vertical centering is also a sore point and you have to jump through many hoops to achieve an effect that is easy with a table. There are methods but nothing straight forward.

Here&#039;s an example:

http://www.pmob.co.uk/pob/vertical-center1.htm

I think someone was napping and they missed out how to vertically center elements when writing the specs. :)</description>
		<content:encoded><![CDATA[<p>Hi Chris,</p>
<p>Thanks for your comments and I have to agree that margin collapse works against us most of the times and would possibly be easier to handle if margins didn&#8217;t collapse at all.</p>
<p>Vertical centering is also a sore point and you have to jump through many hoops to achieve an effect that is easy with a table. There are methods but nothing straight forward.</p>
<p>Here&#8217;s an example:</p>
<p><a href="http://www.pmob.co.uk/pob/vertical-center1.htm" rel="nofollow">http://www.pmob.co.uk/pob/vertical-center1.htm</a></p>
<p>I think someone was napping and they missed out how to vertically center elements when writing the specs. <img src='http://www.search-this.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/comment-page-1/#comment-14671</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Tue, 07 Aug 2007 23:10:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/#comment-14671</guid>
		<description>Two biggest complaints about CSS:

1. This retarded margin collapsing bs.
2. Not being able to easily center vertically.

With that out of the way, your writing style is nice and easy to follow.</description>
		<content:encoded><![CDATA[<p>Two biggest complaints about CSS:</p>
<p>1. This retarded margin collapsing bs.<br />
2. Not being able to easily center vertically.</p>
<p>With that out of the way, your writing style is nice and easy to follow.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Positive Side of Negative Margins</title>
		<link>http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/comment-page-1/#comment-14108</link>
		<dc:creator>The Positive Side of Negative Margins</dc:creator>
		<pubDate>Wed, 01 Aug 2007 13:28:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/#comment-14108</guid>
		<description>[...] construct a number of paragraphs that all have a 20px top and bottom margin. You may recall from my collapsing margin article that adjacent margins of static elements will collapse into one margin. So each paragraph [...]</description>
		<content:encoded><![CDATA[<p>[...] construct a number of paragraphs that all have a 20px top and bottom margin. You may recall from my collapsing margin article that adjacent margins of static elements will collapse into one margin. So each paragraph [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: johno</title>
		<link>http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/comment-page-1/#comment-11121</link>
		<dc:creator>johno</dc:creator>
		<pubDate>Fri, 22 Jun 2007 15:57:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/#comment-11121</guid>
		<description>great article. I&#039;ve had to explain this over and over again. I&#039;ll now just point people to this post. Thanks.</description>
		<content:encoded><![CDATA[<p>great article. I&#8217;ve had to explain this over and over again. I&#8217;ll now just point people to this post. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: itispals</title>
		<link>http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/comment-page-1/#comment-6019</link>
		<dc:creator>itispals</dc:creator>
		<pubDate>Wed, 23 May 2007 06:04:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/#comment-6019</guid>
		<description>I have always believed good articles entices visitors and today after going through these wonderful articles, i am subscribing to your website. 
Keep up the good work.
regards,
itispals</description>
		<content:encoded><![CDATA[<p>I have always believed good articles entices visitors and today after going through these wonderful articles, i am subscribing to your website.<br />
Keep up the good work.<br />
regards,<br />
itispals</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dean</title>
		<link>http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/comment-page-1/#comment-5784</link>
		<dc:creator>Dean</dc:creator>
		<pubDate>Sat, 19 May 2007 17:12:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/#comment-5784</guid>
		<description>This is the best explanation I&#039;ve seen so far on this topic -- thorough, and clearly written.  Thanks, Paul.

I, unfortunately, &lt;em&gt;have&lt;/em&gt; been aware of this problem.  A few years ago I spent countless hours battling with collapsing nested margins and floats, eventually solving it by adding a 1px border.

But it was never &lt;em&gt;really&lt;/em&gt; solved, because I didn&#039;t completely understand why margins collapse in specific cases and not in others.  With this article, hopefully, that will change and working with margins and floats will be easier now.  Thanks again Paul.  I appreciate your work.</description>
		<content:encoded><![CDATA[<p>This is the best explanation I&#8217;ve seen so far on this topic &#8212; thorough, and clearly written.  Thanks, Paul.</p>
<p>I, unfortunately, <em>have</em> been aware of this problem.  A few years ago I spent countless hours battling with collapsing nested margins and floats, eventually solving it by adding a 1px border.</p>
<p>But it was never <em>really</em> solved, because I didn&#8217;t completely understand why margins collapse in specific cases and not in others.  With this article, hopefully, that will change and working with margins and floats will be easier now.  Thanks again Paul.  I appreciate your work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul OB</title>
		<link>http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/comment-page-1/#comment-4780</link>
		<dc:creator>Paul OB</dc:creator>
		<pubDate>Wed, 09 May 2007 09:41:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/#comment-4780</guid>
		<description>Thanks Jelena, Collapsing margins are a mis-understood section of CSS and one that can cause significant layout differences if you don&#039;t account for them :)</description>
		<content:encoded><![CDATA[<p>Thanks Jelena, Collapsing margins are a mis-understood section of CSS and one that can cause significant layout differences if you don&#8217;t account for them <img src='http://www.search-this.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Golgotha</title>
		<link>http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/comment-page-1/#comment-4701</link>
		<dc:creator>Golgotha</dc:creator>
		<pubDate>Tue, 08 May 2007 21:35:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/#comment-4701</guid>
		<description>Hey Jelena, don&#039;t feel bad, I don&#039;t think I consciously knew about it either. I&#039;m sure I&#039;ve ran into it before... Probably banged my head against the wall for 20 minutes because of it before... and then ended up emailing Paul. That&#039;s usually how I deal with these little CSS idiosyncrasies.</description>
		<content:encoded><![CDATA[<p>Hey Jelena, don&#8217;t feel bad, I don&#8217;t think I consciously knew about it either. I&#8217;m sure I&#8217;ve ran into it before&#8230; Probably banged my head against the wall for 20 minutes because of it before&#8230; and then ended up emailing Paul. That&#8217;s usually how I deal with these little CSS idiosyncrasies.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jelena</title>
		<link>http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/comment-page-1/#comment-4699</link>
		<dc:creator>Jelena</dc:creator>
		<pubDate>Tue, 08 May 2007 21:12:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/#comment-4699</guid>
		<description>Wow, such a great article, Paul! I have to say that I had no idea about till now. :blush:</description>
		<content:encoded><![CDATA[<p>Wow, such a great article, Paul! I have to say that I had no idea about till now. :blush:</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul OB</title>
		<link>http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/comment-page-1/#comment-4694</link>
		<dc:creator>Paul OB</dc:creator>
		<pubDate>Tue, 08 May 2007 20:48:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/#comment-4694</guid>
		<description>Hi Mark, Its a little widget called calipers.

http://www.iconico.com/caliper/v3upgrade.aspx

I&#039;ve used the free version for years and can&#039;t live without it now :)

I may upgrade to the paid version as it has a lot more features.</description>
		<content:encoded><![CDATA[<p>Hi Mark, Its a little widget called calipers.</p>
<p><a href="http://www.iconico.com/caliper/v3upgrade.aspx" rel="nofollow">http://www.iconico.com/caliper/v3upgrade.aspx</a></p>
<p>I&#8217;ve used the free version for years and can&#8217;t live without it now <img src='http://www.search-this.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I may upgrade to the paid version as it has a lot more features.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Golgotha</title>
		<link>http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/comment-page-1/#comment-4692</link>
		<dc:creator>Golgotha</dc:creator>
		<pubDate>Tue, 08 May 2007 20:30:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/#comment-4692</guid>
		<description>Hey Paul, what&#039;s that tool you use in the screenshots to indicate the pixel widths?</description>
		<content:encoded><![CDATA[<p>Hey Paul, what&#8217;s that tool you use in the screenshots to indicate the pixel widths?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: scriptygoddess &#187; How margins work in CSS</title>
		<link>http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/comment-page-1/#comment-4674</link>
		<dc:creator>scriptygoddess &#187; How margins work in CSS</dc:creator>
		<pubDate>Tue, 08 May 2007 18:36:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/05/07/wheres-my-margin-gone-or-why-111/#comment-4674</guid>
		<description>[...] is a great article/tutorial on how margins work in css (why/when then collapse, and why/when they [...]</description>
		<content:encoded><![CDATA[<p>[...] is a great article/tutorial on how margins work in css (why/when then collapse, and why/when they [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

