Re: xhtml and input width?

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

Quote:

        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
http://css-discuss.incutio.com/?page=OffTopic

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

http://www.w3.org/TR/xhtml1/#h-4.8

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.

http://web.archive.org/web/20041010185323/www.allmyfaqs.com/faq.pl?Tableless_layouts

> 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
instance).

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