DCSIMG
November 2010 - Posts - Avi Pinto

Avi Pinto

על הבלוג

Follow uberPinto on Twitter

View Avi Pinto's profile on LinkedIn

Subscribe in a reader Subscribe by Email

 


Two new sculptures

View my Air Brush Work at Avipinto.com

Helping a friend, great tool for fixing file names

JavaScript Tutorial


Disclaimer All postings/content on this blog are licensed under a Creative Commons Attribution By license and provided "AS IS" with no warranties, and confer no rights.
All entries in this blog are my opinion and don't necessarily reflect the opinion of my employer or sponsors.

November 2010 - Posts

double scrollbars with "overflow-y: scroll" on IE7 when using cssstickyfooter

The Point:

cssstickyfooter is a great solution for a sticky footer(works even at the crappy IE6).
Alas, when trying to set body{overflow-y: scroll} you get a double scroll on IE7(which is also pure crap and should die).

The solution for this one is to set the style on the html: html{overflow-y:scroll} 

 

Some details:

doubleScroll

Abused the cssstickyfooter site(as it uses it’s technique) to show the double scroll.

To try it just open it in IE compatibility mode, hit f12 and at the script tab type: document.getElementsByTagName("body")[0].style.overflow = "scroll"

 

I like having a vertical scrollbar on my designs,

this way if a page is loaded without a scroll and then some action loads data that adds the scroll,

the page doesn’t “jump” as the scroll is added.

Usually I add the scroll to the body, but that caused the double scroll on IE7 when I used the cssstickyfooter.

 

Didn’t have the time to check why, and most of the pages in my app have a big scroll,

so left it for later and removed the definition.

Till saw @getify’s confession which triggered my interest to check this once again,

the answer came from @Brodingo , feel stupid I haven’t tried it when I encountered the problem.

 

This is one of the things that are great about twitter - one confession can lead to the solution of a long time annoying problem :-)