<?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: The Positive Side of Negative Margins</title>
	<atom:link href="http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/</link>
	<description>Internet Marketing, Website Promotion and Blogging Advice</description>
	<lastBuildDate>Fri, 05 Mar 2010 22:39:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Sylwester w Górach</title>
		<link>http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/comment-page-1/#comment-160636</link>
		<dc:creator>Sylwester w Górach</dc:creator>
		<pubDate>Fri, 19 Feb 2010 07:06:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/#comment-160636</guid>
		<description>I never thout about using negative margins but it gives some ideas about what new can i do on my website, The more i read this articles the more ideas i have.</description>
		<content:encoded><![CDATA[<p>I never thout about using negative margins but it gives some ideas about what new can i do on my website, The more i read this articles the more ideas i have.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Definitive Guide to Using Negative Margins &#171; Smashing Magazine</title>
		<link>http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/comment-page-1/#comment-153744</link>
		<dc:creator>The Definitive Guide to Using Negative Margins &#171; Smashing Magazine</dc:creator>
		<pubDate>Thu, 15 Oct 2009 21:54:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/#comment-153744</guid>
		<description>[...] Search This, The Positive Side of Negative Margins [...]</description>
		<content:encoded><![CDATA[<p>[...] Search This, The Positive Side of Negative Margins [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul OB</title>
		<link>http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/comment-page-1/#comment-149872</link>
		<dc:creator>Paul OB</dc:creator>
		<pubDate>Mon, 17 Aug 2009 11:04:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/#comment-149872</guid>
		<description>Hi Zoffix,

Example 2 can only seemed to be fixed by changing the height:100% to height 100px which will fix the problem but makes using percentage heights impossible. 

Although I can&#039;t really think of an example where the parents height wouldn&#039;t be known in this scenario and that you could use pixel heights anyway. If the parent has a height then you can always use a pixel height and solve the problem. Therefore the example seems to be unsolvable but a little contrived as there would be a solution using pixel heights in nearly all cases I can think of.

However it is still a nasty bug :)

Example 3 can be fixed quite easily with extra html and you just need to use an inner element to hold the relative offset.

Nest a span inside example 3 and use this.
e.g.

.example3 span{
	position:relative;
	zoom:1.0;
	right:20px;
	border: 1px solid #000;
	background: #A5A5A5;
	width:100%
}

Of course that would need to be only given to IE6/7 and hidden from others (and the original styles on .example 2 amended to remove the background and borders etc).

Interesting demos though :)</description>
		<content:encoded><![CDATA[<p>Hi Zoffix,</p>
<p>Example 2 can only seemed to be fixed by changing the height:100% to height 100px which will fix the problem but makes using percentage heights impossible. </p>
<p>Although I can&#8217;t really think of an example where the parents height wouldn&#8217;t be known in this scenario and that you could use pixel heights anyway. If the parent has a height then you can always use a pixel height and solve the problem. Therefore the example seems to be unsolvable but a little contrived as there would be a solution using pixel heights in nearly all cases I can think of.</p>
<p>However it is still a nasty bug <img src='http://www.search-this.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Example 3 can be fixed quite easily with extra html and you just need to use an inner element to hold the relative offset.</p>
<p>Nest a span inside example 3 and use this.<br />
e.g.</p>
<p>.example3 span{<br />
	position:relative;<br />
	zoom:1.0;<br />
	right:20px;<br />
	border: 1px solid #000;<br />
	background: #A5A5A5;<br />
	width:100%<br />
}</p>
<p>Of course that would need to be only given to IE6/7 and hidden from others (and the original styles on .example 2 amended to remove the background and borders etc).</p>
<p>Interesting demos though <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: Paul OB</title>
		<link>http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/comment-page-1/#comment-149870</link>
		<dc:creator>Paul OB</dc:creator>
		<pubDate>Mon, 17 Aug 2009 10:38:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/#comment-149870</guid>
		<description>Ah sorry - I misunderstood - I&#039;ll take another look :)</description>
		<content:encoded><![CDATA[<p>Ah sorry &#8211; I misunderstood &#8211; I&#8217;ll take another look <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: Zoffix Znet</title>
		<link>http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/comment-page-1/#comment-149866</link>
		<dc:creator>Zoffix Znet</dc:creator>
		<pubDate>Mon, 17 Aug 2009 10:19:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/#comment-149866</guid>
		<description>Sorry, but that didn&#039;t help. The `height` in percentages set on the first example is not for giving layout; I already have `display` property there giving it. Let&#039;s pretend it&#039;s by design; one wants to have a percentage height of the parent. It&#039;s broken there.

I know that `right: auto` does nothing, that was to show in the demo that setting it to any value causes the bug in IE6 and 7. Let&#039;s pretend it&#039;s `right: 20px`.

Cheers</description>
		<content:encoded><![CDATA[<p>Sorry, but that didn&#8217;t help. The `height` in percentages set on the first example is not for giving layout; I already have `display` property there giving it. Let&#8217;s pretend it&#8217;s by design; one wants to have a percentage height of the parent. It&#8217;s broken there.</p>
<p>I know that `right: auto` does nothing, that was to show in the demo that setting it to any value causes the bug in IE6 and 7. Let&#8217;s pretend it&#8217;s `right: 20px`.</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul OB</title>
		<link>http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/comment-page-1/#comment-149862</link>
		<dc:creator>Paul OB</dc:creator>
		<pubDate>Mon, 17 Aug 2009 09:01:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/#comment-149862</guid>
		<description>Hi Zoffix,

I think I already covered these issues in the article and you need height:1px (not 1%) for IE6 and then use min-height:0 for IE7.

The right:auto on position:relative means nothing so should be removed because it is confusing IE.

The css should be like this:


.example1 {
	background: #F5F5F5;
	padding: 10px 0;
	width: 500px;
	height: 100px;
	margin: 10px auto;
	border: 1px solid #000;
}
.example2 {
	background: #A5A5A5;
	margin-right: -500px;
	position: relative;
	border: 1px solid #000;
}
.example2 {
	display: block;
}
.example3 {
	height: auto;
}
* html .example2,* html .example3{height:1px}
.example2,.example3 {min-height:0}

That seems to make both negative margins work as expected.

Hope that helps</description>
		<content:encoded><![CDATA[<p>Hi Zoffix,</p>
<p>I think I already covered these issues in the article and you need height:1px (not 1%) for IE6 and then use min-height:0 for IE7.</p>
<p>The right:auto on position:relative means nothing so should be removed because it is confusing IE.</p>
<p>The css should be like this:</p>
<p>.example1 {<br />
	background: #F5F5F5;<br />
	padding: 10px 0;<br />
	width: 500px;<br />
	height: 100px;<br />
	margin: 10px auto;<br />
	border: 1px solid #000;<br />
}<br />
.example2 {<br />
	background: #A5A5A5;<br />
	margin-right: -500px;<br />
	position: relative;<br />
	border: 1px solid #000;<br />
}<br />
.example2 {<br />
	display: block;<br />
}<br />
.example3 {<br />
	height: auto;<br />
}<br />
* html .example2,* html .example3{height:1px}<br />
.example2,.example3 {min-height:0}</p>
<p>That seems to make both negative margins work as expected.</p>
<p>Hope that helps</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zoffix Znet</title>
		<link>http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/comment-page-1/#comment-149833</link>
		<dc:creator>Zoffix Znet</dc:creator>
		<pubDate>Sun, 16 Aug 2009 23:07:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/#comment-149833</guid>
		<description>Sorry for the comment flood (can you tell I have ADHD, eh?) but just wanted to mention that this same problem exists in IE7 as well.

Cheers</description>
		<content:encoded><![CDATA[<p>Sorry for the comment flood (can you tell I have ADHD, eh?) but just wanted to mention that this same problem exists in IE7 as well.</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zoffix Znet</title>
		<link>http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/comment-page-1/#comment-149831</link>
		<dc:creator>Zoffix Znet</dc:creator>
		<pubDate>Sun, 16 Aug 2009 22:57:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/#comment-149831</guid>
		<description>Another thing I just noticed while trying to fix that IE6 bug is that setting `right` property to any value (even auto) will cause the same problem - negative margin does not escape the container.

I&#039;ve set up a demo for both of those setups that break in IE6 here: http://haslayout.net/demos/ie6-unfixable-right-negative-margin-bug-demo.html

If anyone ever finds a solution, let me know.

Cheers</description>
		<content:encoded><![CDATA[<p>Another thing I just noticed while trying to fix that IE6 bug is that setting `right` property to any value (even auto) will cause the same problem &#8211; negative margin does not escape the container.</p>
<p>I&#8217;ve set up a demo for both of those setups that break in IE6 here: <a href="http://haslayout.net/demos/ie6-unfixable-right-negative-margin-bug-demo.html" rel="nofollow">http://haslayout.net/demos/ie6-unfixable-right-negative-margin-bug-demo.html</a></p>
<p>If anyone ever finds a solution, let me know.</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zoffix Znet</title>
		<link>http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/comment-page-1/#comment-149830</link>
		<dc:creator>Zoffix Znet</dc:creator>
		<pubDate>Sun, 16 Aug 2009 22:37:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/#comment-149830</guid>
		<description>Hey, yeah, I skipped over that bit. By no way was I recommending anything, as you can see in my bug tutorial I recommend using conditional comments.

Anyway, what I notice that if `height` is set in percentages (irrelevant of whether the parent has set height or not) then the right negative margin refuses to &quot;work&quot; (i.e. it does not move to the outside of the parent) it does not get fixed by giving the element &quot;layout&quot; using any other method and increasing the value of the margin does not make it go out either. Was just wondering if you know a fix for this problem already.

Cheers</description>
		<content:encoded><![CDATA[<p>Hey, yeah, I skipped over that bit. By no way was I recommending anything, as you can see in my bug tutorial I recommend using conditional comments.</p>
<p>Anyway, what I notice that if `height` is set in percentages (irrelevant of whether the parent has set height or not) then the right negative margin refuses to &#8220;work&#8221; (i.e. it does not move to the outside of the parent) it does not get fixed by giving the element &#8220;layout&#8221; using any other method and increasing the value of the margin does not make it go out either. Was just wondering if you know a fix for this problem already.</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul OB</title>
		<link>http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/comment-page-1/#comment-149826</link>
		<dc:creator>Paul OB</dc:creator>
		<pubDate>Sun, 16 Aug 2009 20:59:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/#comment-149826</guid>
		<description>Hi Zoffix,

Thanks for your comments.

You obvioulsy skipped over the part where I mention that the height:1% hack does not actually work in this case and it has to be height:1px which &quot;must&quot; only be given to IE6 otherwise everyone else only gets 1px height.

It is also very risky to recommend that authors use height:1% for all because it will cause problems when the parent element has a set height and then the 1% will resolve to 1% and you will get very little content showing. 

Although height:1% can be used safely where the parents are height:auto I would advise against it because it&#039;s an accident waiting to happen.

Separating the hack into a specific ie6 only rule means that it is safe forever even when you go back at a later date and add heights to your parents for whatever reason.

Consistency is the key here :)</description>
		<content:encoded><![CDATA[<p>Hi Zoffix,</p>
<p>Thanks for your comments.</p>
<p>You obvioulsy skipped over the part where I mention that the height:1% hack does not actually work in this case and it has to be height:1px which &#8220;must&#8221; only be given to IE6 otherwise everyone else only gets 1px height.</p>
<p>It is also very risky to recommend that authors use height:1% for all because it will cause problems when the parent element has a set height and then the 1% will resolve to 1% and you will get very little content showing. </p>
<p>Although height:1% can be used safely where the parents are height:auto I would advise against it because it&#8217;s an accident waiting to happen.</p>
<p>Separating the hack into a specific ie6 only rule means that it is safe forever even when you go back at a later date and add heights to your parents for whatever reason.</p>
<p>Consistency is the key here <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: Zoffix Znet</title>
		<link>http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/comment-page-1/#comment-149791</link>
		<dc:creator>Zoffix Znet</dc:creator>
		<pubDate>Sun, 16 Aug 2009 01:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/#comment-149791</guid>
		<description>All I want to add is that if your container does not have fixed height, you can give both IE6 and IE7 &quot;layout&quot; using foo { height: 1% } and not have to hide it from sane browsers because it would compute to `auto` anyway.

I&#039;ve documented the negative margin on http://haslayout.net/css/view?tut=Negative-Margin-Bug if anyone cares.

Cheers!</description>
		<content:encoded><![CDATA[<p>All I want to add is that if your container does not have fixed height, you can give both IE6 and IE7 &#8220;layout&#8221; using foo { height: 1% } and not have to hide it from sane browsers because it would compute to `auto` anyway.</p>
<p>I&#8217;ve documented the negative margin on <a href="http://haslayout.net/css/view?tut=Negative-Margin-Bug" rel="nofollow">http://haslayout.net/css/view?tut=Negative-Margin-Bug</a> if anyone cares.</p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Akron Headlines &#124; Tech News, Sport News, any news that is interesting to Valerie Shipbaugh</title>
		<link>http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/comment-page-1/#comment-127638</link>
		<dc:creator>Akron Headlines &#124; Tech News, Sport News, any news that is interesting to Valerie Shipbaugh</dc:creator>
		<pubDate>Thu, 12 Feb 2009 16:16:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/#comment-127638</guid>
		<description>[...] The Positive Side of Negative Margins A clear and concise run-down of how negative margins work in CSS. (tags: css) [...]</description>
		<content:encoded><![CDATA[<p>[...] The Positive Side of Negative Margins A clear and concise run-down of how negative margins work in CSS. (tags: css) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rajeev mehta</title>
		<link>http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/comment-page-1/#comment-67388</link>
		<dc:creator>rajeev mehta</dc:creator>
		<pubDate>Sun, 22 Jun 2008 17:09:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/#comment-67388</guid>
		<description>hi paul thanks for the  great article but when I try to give a border to the two boxes the second box shifts down and it doesn&#039;t overlap the first one even though I have kept the margin-right for the first box -200px.Can you please clear my doubt regarding this.. Thank you</description>
		<content:encoded><![CDATA[<p>hi paul thanks for the  great article but when I try to give a border to the two boxes the second box shifts down and it doesn&#8217;t overlap the first one even though I have kept the margin-right for the first box -200px.Can you please clear my doubt regarding this.. Thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: News Wire: A Blueprint for CSS Design &#124; Datawinds</title>
		<link>http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/comment-page-1/#comment-67113</link>
		<dc:creator>News Wire: A Blueprint for CSS Design &#124; Datawinds</dc:creator>
		<pubDate>Sun, 22 Jun 2008 00:44:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/#comment-67113</guid>
		<description>[...] The Positive Side of Negative Margins A clear and concise run-down of how negative margins work in CSS. (tags: css) [...]</description>
		<content:encoded><![CDATA[<p>[...] The Positive Side of Negative Margins A clear and concise run-down of how negative margins work in CSS. (tags: css) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Snyders</title>
		<link>http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/comment-page-1/#comment-59314</link>
		<dc:creator>John Snyders</dc:creator>
		<pubDate>Thu, 22 May 2008 19:47:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.search-this.com/2007/08/01/the-positive-side-of-negative-margins/#comment-59314</guid>
		<description>This is the best explanation of negative margins I have seen.

My question is about using negative margins and floats to create a two column layout.

I understand the motivation for putting the content first and sidebar second (in document order) but if the sidebar *did* come first what would you expect the effect to be?

I had a page where the sidebar did come first and it was working fine on IE6/7, Opera 9.25 and Firefox 2. It doesn&#039;t work with Firefox 3rc1 or Safari (3.0.4 on Windows)

The problem is that mouse clicks in the sidebar are ignored. You can&#039;t click inputs or links or select text. You do have keyboard access to them. Also if the float with negative margin has a background color it covers the sidebar.

Is there some CSS rule that says the float with negative margin must come first? 

I asked the question on the Firefox discussion group also. There is an example that shows the issue there.

http://groups.google.com/group/mozilla.dev.apps.firefox/browse_thread/thread/a42bcf6bf689bcf2?hl=en#</description>
		<content:encoded><![CDATA[<p>This is the best explanation of negative margins I have seen.</p>
<p>My question is about using negative margins and floats to create a two column layout.</p>
<p>I understand the motivation for putting the content first and sidebar second (in document order) but if the sidebar *did* come first what would you expect the effect to be?</p>
<p>I had a page where the sidebar did come first and it was working fine on IE6/7, Opera 9.25 and Firefox 2. It doesn&#8217;t work with Firefox 3rc1 or Safari (3.0.4 on Windows)</p>
<p>The problem is that mouse clicks in the sidebar are ignored. You can&#8217;t click inputs or links or select text. You do have keyboard access to them. Also if the float with negative margin has a background color it covers the sidebar.</p>
<p>Is there some CSS rule that says the float with negative margin must come first? </p>
<p>I asked the question on the Firefox discussion group also. There is an example that shows the issue there.</p>
<p><a href="http://groups.google.com/group/mozilla.dev.apps.firefox/browse_thread/thread/a42bcf6bf689bcf2?hl=en#" rel="nofollow">http://groups.google.com/group/mozilla.dev.apps.firefox/browse_thread/thread/a42bcf6bf689bcf2?hl=en#</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
