I'm trying to use:
XHTML 1.0 transitional as my DOCTYPE on a page. Everything works fine, except for a 'Floating DIV' I have a DIV that stays at a certain location on the screen even after scrolling. Here's the function:Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
and in the body tag I have onScroll="doIt()"Code:function doIt() { document.getElementById('sd').style.top = document.body.scrollTop + 50 }
Now, this script works if I remove the DOCTYPE bit, but I want to keep it, or at least have a DOCTYPE. Does anyone know of any DOCTYPE that supports this, or do you know how to get around this?





Reply With Quote