W3C home > Mailing lists > Public > www-style@w3.org > July 2003

Width of an absolute positioned element

From: Christoph A. Mueller <chris@christophm.de>
Date: Tue, 22 Jul 2003 19:56:51 +0200
To: <www-style@w3.org>
Message-Id: <E19f1NZ-0000Ra-00@mrelayng.kundenserver.de>

Hi,
I have a question about the correct width of an absolute positioned element.

I have the following document:
------
...
<body>
 <div style="position:absolute; left:0; top:0; width:100%">text</div>
</body>
...
------

The width of the div element is defined as 100%.

But the width of the div element is different in Mozilla 1.4, Opera 7.11 and
IE 6. Mozilla draws the div element from the left window border to the right
window border. But in Opera and IE, 100% is only the content edge of the
body element. Thus the window width minus the margin, padding and border.
If I set the margin and padding of the body to zero, Opera and IE draw the
div element from the left window border to the right window border too.

But I would like to know, which browser behaviour is defined in the css
standard?

Thanks
Christoph Mueller
Received on Tuesday, 22 July 2003 13:56:54 GMT

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