Closed Bug 101084 Opened 23 years ago Closed 20 years ago

[FIX KNOWN]dotted lines do not hug image (no margin at bottom of <form> in <td>)

Categories

(Core :: Layout: Form Controls, defect)

x86
Windows 98
defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: aufbau01, Assigned: martijn.martijn)

References

()

Details

(Keywords: testcase)

Attachments

(8 files, 2 obsolete files)

The dotted lines above and below the photocollage on http://www.np.edu.sg/ do
not hug the image in Mozilla.  In other browsers, there is no space between the
dotted lines and the image.

The spaces are caused by a rowspan=6 column at the right containing an image
with a fixed width of 382 (300 in the testcase).  Because of differences in the
way Mozilla handles form margins, the total of the *minimum* heights for each of
the cells is smaller than 300, and Mozilla compensates (as would any other
browser) by increasing the height of some of the rows of the table.

Instead of using a fixed-height image, the page could have give the column a
white or transparent background.  Alternately, the extra column could be removed
from the page.  Or Mozilla could change its handling of form margins to be in
line with IE and Netscape 4 :)

I searched for bugs about form margins and only found bug 41806 and bug 30988.
Keywords: testcase
Um... I would say that this is a duplicate of bug 41806....
hmm... actually.... nevermind.

The reason for the lack of margin is this rule in quirk.css:

td > form:last-node { margin-bottom: 0 }

Why do we have this quirk?  Over to forms.  ccing hixie.
Assignee: karnaze → rods
Status: UNCONFIRMED → NEW
Component: HTMLTables → HTML Form Controls
Ever confirmed: true
QA Contact: amar → madhur
Status: NEW → ASSIGNED
Summary: dotted lines do not hug image (no margin at bottom of <form> in <td>) → [FIX KNOWN]dotted lines do not hug image (no margin at bottom of <form> in <td>)
Target Milestone: --- → mozilla0.9.9
Target Milestone: mozilla0.9.9 → Future
Ian, can't we just remove this quirk that IE and NS4 do not have?
Assignee: rods → form
Status: ASSIGNED → NEW
Keywords: qawanted
QA Contact: madhur → ian
Target Milestone: Future → ---
You can remove all the quirks, as far as I am concerned. The fewer we have the
better for QA, the better for the Web, and the better for maintenance.
Could someone with access to IE test the various elements we have listed at
http://lxr.mozilla.org/seamonkey/source/layout/html/document/src/quirk.css#149
and see what IE does with them in a <td>?  I tested a random sample (<form>,
<h1> <blockquote>) in NS4 and NS4 does leave the bottom margin on them (though
not on <p>).
I didn't use <plaintext> in the testcase, it was too weird in IE :)
Aarrgghh, forget that. Sorry, I had some errors in that testcase. This is a
good one.
Attachment #148976 - Attachment is obsolete: true
Attachment #148977 - Attachment is obsolete: true
Attached image The good screenshot
OK, so looks like we should in fact remove most of our td-related margin quirks
(barring <p>, of course).

Martijn, what do you get if you have more than one node as the child of the
<td>, if I may ask?   So if you have:

  <td><form></form><form></form></td>

and similarly for the other tags.
This is a screenshot of IE6 following with a testcase made by following the
comments from comment 12.
Just ask if I need to upload the testcase itself also.
Yes, please upload the testcase so we know what we've tested.  ;)
Ok, here it is...
What if you put text in both of the forms in the table cell?
IE6 renders the extra margin.

Source:
<table><tbody><tr><td><form>This is a form.</form><form>This is a
form.</form></td></tr></tbody></table>
This makes the rendering of Mozilla in quirks mode more in line with IE6.

If that's the purpose of quirk.css, then I know a case in which Mozilla in
quirks mode handles the margin of a p tag different inside a table cell .
This: <table><tr><td><p></p><p>this is a p</p></td></tr>
gets a top margin from the second p element, but this does not happen in IE6.
Should that case of IE-quirkiness also be covered?
Thanks David. I can't do checkins. Could you do the checkin for me? Thanks.
Assignee: core.layout.form-controls → m.wargers
Comment on attachment 151305 [details] [diff] [review]
Patch which removes margin-bottom rules except for p

sr=bzbarsky
Attachment #151305 - Flags: superreview+
Checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
This broke bonsai diffs :-(
> This broke bonsai diffs :-(

How so?
Blocks: 175905
Keywords: qawanted
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: