IE6 Position: Absolute in Relative Container Resize

I have this error in IE6. I showed it here http://fiddle.jshell.net/bfXGC/2 . When you increase the height of the container, then the position of the absolute block is updated to the bottom of the container. When you increase the height of the inner content, the position of the absolute block is not updated. How can I fix this behavior in IE6

+4
source share
2 answers

The only way I can make this work is to set the css top value to an absolute div with every update:

 $("div.absolute").css("top", $(".inner").height()); 

Here is a working example. http://fiddle.jshell.net/bfXGC/14/

+2
source

You did not indicate whether a JavaScript fix is โ€‹โ€‹acceptable, but if so, this works:

 $('.absolute').css('position', 'static').css('position', 'absolute'); 

Yes, this is just a reuse of position: absolute . This makes IE6 recount.

See: http://fiddle.jshell.net/bfXGC/15/

+2
source

All Articles