If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

DOCTYPE declaration alters behaviour




Layout: Tables
15 years ago
15 years ago


(Reporter: Gunnar Hjalmarsson, Unassigned)


Windows 98

Firefox Tracking Flags

(Not tracked)




15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2.1) Gecko/20021130
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2.1) Gecko/20021130

The DOCTYPE declaration in itself affects the way <p> elements in table cells
are rendered. The documents below are identical except for the DOCTYPE
declaration, but display different results.

The effect can be compensated for through CSS, but it's not always that easy if
you still care about what happens when rendered in NS4 (which I do).

Reproducible: Always

Steps to Reproduce:
1. Load this document: http://www.gunnar.cc/misc/doctype.html
2. Load this document: http://www.gunnar.cc/misc/nodoctype.html
3. Compare the results

Actual Results:  
When there is a DOCTYPE declaration, the built-in <p> top and bottom margins are
recognized, but without DOCTYPE, they are not.

Expected Results:  
The results should have been identical. Considering how other browsers work in
this respect, the behaviour without DOCTYPE is the preferred one IMO.

A while ago I experienced a similar problem with NS6. I had a table with rowspan
attributes, and I had to remove the DOCTYPE declaration to prevent the document
from being screwed up...

Comment 1

15 years ago
This bug is invalid. We use the quirks mode to emulate buggy behaviour of NN4
and IE (http://www.hut.fi/~hsivonen/doctype.html). A page author can select
which rendering is desired by choosing the right doctype. Strict rendering is
invoked by the xhtml1.1 doctype. The code that removes the margins from  can be
found at
Other browser should not influence the rendering in strict mode as only the
specifications should do that. Please reopen the bug if you find a place in the
CSS2 spec that supports your required behaviour.
Last Resolved: 15 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.