Ash Clarke

Software Engineer. User Interface Developer. Gamer. Nerd.

October 12, 2010
by Ash Clarke
1 Comment

IE 6/7 Overflow: auto Scrolling Bug

I came across an issue whereby a scrolling div, styled with overflow: auto does not scroll its contents correctly if its child divs are positioned relatively or floated. When scrolling, the contents were frozen in IE 7 and half frozen in IE 6 with the text just scrolling on its own.

Turns out there is a ridiculously simple fix for this. Just apply relative positioning to the parent div and suddenly, everything falls back into place.

I can’t be thankful enough for how easy this fix is.