|
Posted by Martin Honnen on July 5, 2005, 7:04 pm
Please log in for more thread options
Sugapablo wrote:
> var tDIV = document.getElementById(SRC);
> tDIV.style.top = (tempY - 20);
> tDIV.style.left = (tempX - 20);
left/top with CSS need a number plus a unit so make that
tDIV.style.top = (tempY - 20) + 'px';
tDIV.style.left = (tempX - 20) + 'px';
The DOCTYPE puts Mozilla in strict mode and then it is picky about
correct CSS values (whether in script or in a stylesheet does not matter).
--
Martin Honnen
http://JavaScript.FAQTs.com/
|