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/
.



Relevant Pages

  • Re: XHTML vs HTML
    ... If you can't raionally argue why XHTML should or should not be persued and ... we're talking about XML here. ... the information that HTML doesn't cut it anymore is nuts. ... into virtually *any* other data format. ...
    (microsoft.public.frontpage.programming)
  • Re: Anyone else noticed this issue?
    ... and never has been XHTML. ... The mark-up you are using is tag-soup HTML ... But like any assertion that assertion can be a false ...
    (comp.lang.javascript)
  • Re: FAQ Topic - How do I POST a form to a new window? (2011-01-03)
    ... user-defined DTD) declaring the Transitional variant of HTML 4.01 and ... XHTML 1.0 DTDs. ... HTML* requires that. ... have been tested in at most one browser. ...
    (comp.lang.javascript)
  • Re: XHTML or HTML 4 ?
    ... I personally moved from XHTML 1.0 strict to HTML 4.01 strict about a year ago after reading ... Say NO to XHTML ... Both lists above are valid HTML 4.01 strict but there is one which will be parsed faster in all modern browsers. ...
    (alt.html)
  • Re: XHTML vs HTML
    ... XHTML pages correctly) what are the benefits to coding now with XHTML ... we're talking about XML here. ... the information that HTML doesn't cut it anymore is nuts. ... into virtually *any* other data format. ...
    (microsoft.public.frontpage.programming)