W3C home > Mailing lists > Public > www-html@w3.org > October 2005

Re: xhtml and input width?

From: David Dorward <david@us-lot.org>
Date: Thu, 27 Oct 2005 08:18:45 +0100
To: Henry Lee <hlee23@gmail.com>
Cc: www-html@w3.org
Message-Id: <1130397525.7462.14.camel@cyberman.dorward.me.uk>

On Thu, 2005-10-27 at 04:54 +0000, Henry Lee wrote:


        www-html is a public mailing list intended to be used for
        technical discussion among those interested in enhancing the
        Hypertext Markup Language (HTML) or building systems that
        support HTML.
This isn't really the place for HOWTO questions. I suggest, in future,
you try the some of the forums mentioned at

> I was just putting some simple input boxes in a table and I don't know
> what my error

You have quite a few, many of which are machine detectable. You should
make use of http://validator.w3.org/

>  is but I can't get them to line up when I have my page in:
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

> <style>
> <!--

The validator won't pick up on this problematic comment (since its
syntactically correct, even if it is almost certainly not what you want
to say).


XHTML has rather a lot of subtle gotchas, making it essential (IMO) to
read the specification thoroughly before using it.

>       <td>Name<br><input type="text" name="Name"></td> 

Its possible for forms to consist of tabular data, but this isn't an
example of that.


> If you save it in html and open it in a browser, you'll notice that
> the Test input box does not line up with the rest of the input boxes
> at the end.

As far as I can see, it does line up with the other input boxes. Perhaps
you are dealing with a browser specific issue?

> But if i use this in my page, it works fine. (As it should.)
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

This triggers quirks mode in some browsers (with the most noticeable
effect in MSIE). In quirks mode browsers intentionally get things wrong
to be compatible with earlier, more bug ridden, browsers.

As I can't reproduce the error, I can't suggest how to go about fixing
it. Given that markup I'd start from scratch anyway. (And use HTML 4.01
Strict as there doesn't appear to be any benefit to using XHTML in this

David Dorward                           <http://dorward.me.uk/>
"Anybody remotely interesting is mad, in some way or another."
                             -- The Greatest Show in the Galaxy
Received on Thursday, 27 October 2005 07:14:09 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:11 UTC