Hi, I come across a weird window resize bug in IE8.
Im using a 100% height DIV and the sticky footer method, to keep the footer DIV stuck to the bottom of the browser window.
If I resize IE8 using the top and bottom resize handles, then the sticky footer doesn't update and ends up floating in the middle of the screen (when I stretch the browser window down).
Everything is fine if you resize it left or right, the sticky footer goes to the correct place.
I have found a piece of JS code that appears to fix this weird bug should anyone encounter it.
JS Code Bug Fix;
Im using a 100% height DIV and the sticky footer method, to keep the footer DIV stuck to the bottom of the browser window.
If I resize IE8 using the top and bottom resize handles, then the sticky footer doesn't update and ends up floating in the middle of the screen (when I stretch the browser window down).
Everything is fine if you resize it left or right, the sticky footer goes to the correct place.
I have found a piece of JS code that appears to fix this weird bug should anyone encounter it.
JS Code Bug Fix;
PHP:
<script type="text/javascript">
window.onresize = function ()
{
//add a string with no length at all onto the body's innerHTML (does not actually alter or add anything):
var body = document.getElementsByTagName('body')[0];
//having an interaction between the window and an on-page element seems to put the 'broken wire' back together
body.innerHTML += '';
}
</script>