W3C home > Mailing lists > Public > www-style@w3.org > October 2007

Question about absolutely positioned block

From: <Eugen.Konkov@aldec.com>
Date: Tue, 23 Oct 2007 19:15:34 +0300
Message-ID: <012a01c8158f$f3a3bd00$0100a8c0@kharkov.localhost>
To: <www-style@w3.org>
Is anywhere description
Why absolutely positioned block is not allowed to affect parent element size?

Is it posible you will allow this in CSS3?

In next example I have disadvantages

<div style='position: absolute; width: 300px; border: 1px solid black; margin-top: 10px;'>
  <div style='position: absolute; right: 0px; border: 1px solid red;'>
    LogOut
  </div>
  <span id="mainMenu" style="display:none">File Options Help etc</span>
</div>

You can say that I must use 'float'
<div style='position: absolute; width: 300px; left: 20px; top: 200px ; border: 1px solid black; margin-top: 20px;'>
  <span style='float: right; border: 1px solid red;'>
    LogOut
  </span>
  <span  id="mainMenu" style="display: none">File Options Help etc</span>
</div>

But floats take space from normal flow =(
I want 'LogOut' span does not affect normal flow and affect containing block size
when #mainMenu is hided dynamically
Received on Tuesday, 23 October 2007 16:17:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:55 GMT