I had the same problem in the past, and I used the onscroll event for Javascript to determine if the position of a fixed element would collide with the footer. If so, I change it to a position: absolute with the top attribute located just above, overlapping the footer.
Then, when they start to scroll up the page and no longer overlap the footer, I change it to the position: fixed.
Also, if you plan to scroll this element in IE6, I recommend CSS expressions for the position: emulation fixed.
source share