Hi folks I need to have a banner always appear at the bottom of the
browser window. I was using position:fixed and bottom:0 to achieve it
when I realized that IE6 does not support it.
Can anybody point me to how to use the DOM to emulate position:fixed
in IE6.
Thanks,
Terry
The reality is you must use Javascript, CSS position:fixed fails in IE6
and perhaps IE7 if it's in quirks mode. I used the following code to
move a div back to the top in IE6. Perhaps it will help you set
something for the bottom.
Code follows. It moves a element (in my case a div) to the top after a
scroll or resize event. A timer is used to stop jerky motion during the
scrolling.
var TimerId=null;
function ChkIE()
{
if (window.attachEvent && (is.ie5 || is.ie6)) //note you will have to
set the ie6 and ie5 flags elsewhere doing a browser sniff or do it here
or use IE conditional comments
{
window.attachEvent('onscroll', fix_event);
window.attachEvent('onresize', fix_event);
}}
function fix_event()
{
//smoothe out jerky motion when no delay is done
if (TimerId != null)
clearTimeout(TimerId)
TimerId=setTimeout("ShowTime()",300)
}
function ShowTime()
{
TimerId=null
document.getElementById('ControlDiv').style.top =
document.getElementsByTagName('html')[0].scrollTop+document.getElementsByTagName('body')[0].scrollTop;