Weird IE8 window resize bug...

Soldato
Joined
28 Aug 2006
Posts
3,003
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;
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>
 
Not sure if it's connected by everytime I got on sickipedia (joke site) the text is all screwed until I resize it! Then the site looks fine.

It also is buggy on some forums I go on where by it keeps jumping when you type taxt beyond the main viewable text box (WENB forums for example).
 
surely this is a CSS issue and using JS is really the solution, what if they disable it? I think I used this example last time to get my footer to "STAY THE %$@&! DOWN!" when i went through my website dabbling phase :)

http://ryanfait.com/resources/footer-stick-to-bottom-of-page/

Your probably right about it being a CSS thing. I'm aware that the JS code only works with JS enabled.

Maybe someone can direct me towards a CSS based solution. I wouldn't be too bothered if it was just IE6, but with it being IE8 then I need to find a solution :)
 
Your probably right about it being a CSS thing. I'm aware that the JS code only works with JS enabled.

Maybe someone can direct me towards a CSS based solution. I wouldn't be too bothered if it was just IE6, but with it being IE8 then I need to find a solution :)

see the link i posted :) maybe putting it at the bottom made it look like it was in my sig :p
 
Back
Top Bottom