Closed Bug 123856 Opened 23 years ago Closed 23 years ago

DOCTYPE difference?

Categories

(SeaMonkey :: General, defect)

All
Windows NT
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 22274

People

(Reporter: jeff.schrab, Assigned: asa)

Details

Table cells appear to put implicit line breaks at the end of a row DEPENDING ON
THE DOCTYPE.  This implict <br> takes the size of the current font.  For table
layouts that use ONLY images with NO spaces in between <td>...</td> pairs, I
don't see why this should happen.  Is this the way it's SUPPOSE to happen?

Exhibit A:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

<body>

<table border="1" width="760" cellspacing="0" cellpadding="0">
	<tr><td><img src="spacer.gif" width="760" height="4" border="0" alt=""></td></tr>
	<tr><td><img src="spacer.gif" width="760" height="1" border="0" alt=""></td></tr>
	<tr><td><img src="spacer.gif" width="760" height="5" border="0" alt=""></td></tr>
</table>

</body>
</html>

Exhibit B:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>

<body>

<table border="1" width="760" cellspacing="0" cellpadding="0">
	<tr><td><img src="spacer.gif" width="760" height="4" border="0" alt=""></td></tr>
	<tr><td><img src="spacer.gif" width="760" height="1" border="0" alt=""></td></tr>
	<tr><td><img src="spacer.gif" width="760" height="5" border="0" alt=""></td></tr>
</table>

</body>
</html>

"A" and "B" are VERY different as you can see.  BBEdit on Mac kicks out "Type B"
default DOCTYPE's typically and HomeSite on Windows does "Type A".  What's the
explaination?  A bug or a feature?
This *might* be related to 121960 
For this problem:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
        "http://www.w3.org/TR/1998/REC-html40-19980424/loose.dtd">

WORKS as expected!

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">


DOESN'T!!!  Why?  Bug or feature?
This is a standards-compliance feature not a bug. 

The reason is that Mozilla gos from "quirk" (compatibility) to standards mode
depending on the DOCTYPE (if it has an URL in it etc.)
See this page:
http://www.mozilla.org/docs/web-developer/quirks/doctypes.html

In the latest nightly builds (200202) you can check which mode Mozilla uses by
looking View->Page Info (ctrl+i).

On the problem with the additional line break in your tables, it is correlated
to exactly the same issue, see e.g.:

http://developer.netscape.com/evangelism/docs/articles/img-table/

Someone with the necessary rights to do it should close this bug (I can't)...
You need the following style:

td > img { display: block }

If you want to know why we have the behavior we do, read the comments in bug 22274
but note that our behavior is indeed correct.

*** This bug has been marked as a duplicate of 22274 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.