Re: xhtml style.left problem



On Nov 20, 12:22 pm, carex <ca...@xxxxxxxxx> wrote:
Since a few weeks I am trying to use xhtml i.s.o html everywhere in my web
application

There is no such thing as "xhtml i.s.o html".

XHTML is not recommended: http://www.webdevout.net/articles/beware-of-xhtml

ISO HTML is usually more trouble then it is worth ... and since you
use JS in your example, unsuitable for you.

HTML 4.01 Strict is recommended.

But, for the first time, I have something that is working perfectly with
IE6 but not in Firefox when I use a DOCTYPE

Activating Standards mode and making browsers less forgiving of
errors.

if (y < 0) {
delta=3;
}
y+=delta;
document.getElementById("myDiv").style.left=y;

The left property takes a length. You've just assigned it what I
suspect will turn out to be a number (although it might be something
like 40px3, I'm not certain).

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/
.