[thelist] Netscape 6: Doctype Declarations Can Break Table La youts

James Aylard jaylard at encompass.net
Sat Dec 23 01:07:01 CST 2000


Morbus,

> Did you view source on the page? That's what "take a look at the code"
> means... you'll see the following:

	Hmm. I see.

> <!--<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">-->
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
> Basically, although it breaks the w3c validator, add a commented out
> doctype as the first line. Doesn't harm other browsers, and NS/Moz will
> read the second line only.

	I'm always open to other ways of doing things. I would like to point out,
however, that I provided a solution for the problem that I described, not
simply a workaround. And it validates.
	In my original post, my basic point was that I, as well as others, had
found that Netscape 6 broke table layouts that had worked fine not only in
other browsers, but also in preview releases of Netscape 6 and in late
Mozilla milestones. Some people had suggested that the root cause was likely
non-compliant code. However, my code was compliant, and Netscape 6 still
tweaked the tables.
	As a result of considerable experimentation, I discovered that the URI
portion of the doctype declaration for HTML 4.01 transitional affected how
Netscape rendered the tables, and in my post I noted which URI caused
Netscape to render the tables correctly. I suspect that you only read the
first paragraph of my original post, which just described the problem. If
so, I encourage you to read the rest of that post, as it will likely show
you how to rework your doctype declaration so that your pages will validate.

James Aylard





More information about the thelist mailing list