Hi;

(With all the workarounds necessary for noncompliant browsers, are you really 
any further ahead than you were 
before CSS?)

I've found that giving a box element absolute positioning stops its vertical 
margins from collapsing.*  Any good reasons why one shouldn't use absolute 
positioning everywhere that collapsing margins is a threat?

I've also found (sigh) that IE6 suddenly ignores paragraph margin-right when 
that paragraph is absolutely positioned (it respects all other margins, 
however).  What is THAT all about??

Here are my styles for both effects:

body {margin: 0; }
div {position: relative; width: 780px; margin-left: auto; margin-right: auto; 
height: 500px; background-color: green; 
margin-top: 0; padding: 0;}
p {position: absolute; margin: 50px; }


The markup:
<body>
<div><p>the collapsing margins are prevented by giving this p absolute 
position;  CSS2.1 states that absolutely
positioned boxes don't have collapsing margins. However, it appears that 
absolute positioning also makes 
IE disregard margin-right!</p></div>
</body>

Thanks, in advance, for any help you care to share.
- Michael


* I found some very interesting web articles on Block Formatting contexts, and 
IE's hasLayout -- which seemed to
  give an in-depth view of the mechanisms involved -- but I'm a complete 
beginner to webdesign and CSS, and so 
  found it too difficult to fully grasp.






      Get news delivered with the All new Yahoo! Mail.  Enjoy RSS feeds right 
on your Mail page. Start today 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