----- Original Message ----
From: Michael Leibson <[EMAIL PROTECTED]>
To: Alan Gresley <[EMAIL PROTECTED]>
Cc: css-d@lists.css-discuss.org
Sent: Sunday, July 29, 2007 3:21:08 PM
Subject: collapsing vertical margins

Michael Leibson wrote:

>> . . . IE6 suddenly ignores paragraph margin-right when that paragraph is
>> absolutely positioned (it respects all other margins,
>> however).  What is THAT all about??

>Alan Gresley responded:
> . . . Since you have a width set for your container, it has hasLayout (for IE 
> only), 
>which causes the adjoining margins not to collapse. . . 
>. . . Remember hasLayout only effects IE and when an elements gains hasLayout 
>all types of undesired
>effects are seen, please see

>http://www.satzansatz.de/cssd/onhavinglayout.html>

>Reread this several times over a few weeks and all will eventually sink in.

Hi again, Alan (and anyone else interested in this topic);

I've been trying to understand the satzansatz article, as well as other 
articles to which it refers.
One of these is the article by Markus Mielke, of MS, " "HasLayout" Overview", 
at 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/IETechCol/cols/dnexpie/expie20050831.asp.

Among other things, that article seems to say that once a CSS property triggers 
IE's hasLayout, the affected
block element is given a new 'block formatting context', which I take to mean 
that -- in terms of some parameters,
like dimensions --  it no longer refers to those of its parent, but to those of 
some previous ancestor (eg, 
body, rather than containing div).  If so, this might be the explanation why 
the margins of my absolutely positioned "p"
didn't operate in relation to its containing div, but instead extended past 
that parent.  

Am I on the right track??

If I am, then it would seem to me that the most direct workaround/hack would be 
to somehow hide the
p's {position: absolute;} and the WIDTH, and every other CSS-provoked hasLayout 
trigger from IE, 
but not from all other browsers -- yet still somehow convey those directives to 
IE in a 'less offensive' manner.

Am I still headed in the right direction?

If so, could you (or anyone else interested in this topic) direct me to a site 
that not only gives such a hack,
but also explains it?

Thanks, in advance, for any insights you'd care to share!

- Michael
























      Ask a question on any topic and get answers from real people. Go to 
Yahoo! Answers and share what you know at http://ca.answers.yahoo.com





      Be smarter than spam. See how smart SpamGuard is at giving junk email the 
boot with the All-new Yahoo! Mail at http://mrd.mail.yahoo.com/try_beta?.intl=ca

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to