This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Specification: http://dev.w3.org/html5/spec/Overview.html Multipage: http://www.whatwg.org/C#top Complete: http://www.whatwg.org/c#top Comment: Having a relatively simple code: <table cellpadding=0 cellspacing=0 align="center" border=0 width=0954> <tr><td><table cellpadding=0 cellspacing=0 align="center" width=100% border=0> <tr> <td width=100% colspan="3" height=2 class="MNinner_line"><img src="/Aspacer.gif" width=100% height=2></td> </tr> <tr> <td width=12% > </td> <td width=76% align="center"><b>Title</b></td> <td width=12% > </td> </tr> <tr> <td width=100% colspan="3" height=2 class="MNinner_line"><img src="/Aspacer.gif" width=100% height=2></td> </tr> we are experiencing a rather perplexing problem. When we set the doctype to html 5 (<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 5 Transitional//EN" "http://www.w3.org/TR/html5/loose.dtd">), the background of the rows, with css-class set to MNinner_line, stretches far beyond the specified height. This is true for at least FireFox (v4), IE(v9) and Opera(v11.10). Also, the problem disappears when we change doctype from html 5 to html 4.01. The class MNinner_line is declared thus: TD.MNinner_line { background-color:#244c81; } Posted from: 217.13.17.134 User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0
EDITORIAL ASSISTANT'S RESPONSE: This is an Editorial Assistant's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document: http://dev.w3.org/html5/decision-policy/decision-policy.html Status: Rejected Change Description: no spec change Rationale: This behavior is an interoperable part of the platform now.
Maybe it should also be mentioned that the doctype in the example is not the "HTML5 doctype".
To be more specific, "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 5 Transitional//EN" "http://www.w3.org/TR/html5/loose.dtd">" is *not* the HTML5 doctype. The HTML5 doctype is "<!doctype html>". The doctype you added is instead an unknown doctype, which triggers quirks mode and causes the strange behavior you see.
(In reply to comment #3) > The doctype you added is instead an unknown doctype, which triggers quirks mode No it doesn't.
Oh, derp, perhaps I should actually look at the code first. You are of course right, zcorpan. I hesitate to "correct" such horrible code, but the reason this happens is because <img> are inline by default. Inline elements generate a linebox, which computes its height from the font-size. Thus, the <td> is forced to be at least as tall as the linebox. To fix this, make the <img>s be display:block instead. The reason the "HTML 4.01" doctype worked is because the HTML4 Loose doctype triggers quirks-mode, where <img>s are display:block by default.
mass-move component to LC1