IE and absolute positioning divs

Posted by kainaw on Stack Overflow See other posts from Stack Overflow or by kainaw
Published on 2009-12-28T05:11:57Z Indexed on 2010/03/12 10:27 UTC
Read the original article Hit count: 269

Filed under:
|
|
|
|

This problem is only in IE. Consider the following HTML:
<html>
<body>
<div style='position:absolute;left:1em;right:1em;top:1em;bottom:1em;overflow:auto;'> Put more than a full screen of text in here. It should create a scroll inside the div. In IE, it stretches the div out vertically.
</div>
</body>
</html>
If you put a ton of text in the div, IE will stretch the div out beyond the declared "bottom". I know what it is doing. It considers the bottom of the page to be the bottom of the page after all of the text has been rendered. I want bottom to be the bottom of the visible window. So, I want to have a div that is centered inside the window. Is there some retarded hack to make IE comprehend the basic concept of CSS?

© Stack Overflow or respective owner

Related posts about ie

Related posts about css