Closed Bug 93736 Opened 24 years ago Closed 22 years ago

Unnecessary line breaks in table layout when cell has percentage width specified

Categories

(Core :: Layout: Tables, defect, P3)

x86
Windows NT
defect

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: mentin, Unassigned)

References

()

Details

(Keywords: compat, testcase)

Attachments

(2 files)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.3) Gecko/20010801 BuildID: 2001080110 In the page at http://www.computerra.ru colored lines right from column headers should not be broken into multiple lines. A simple table that is displayed as two colored lines in IE and Opera is displayed as 6 colored lines in Mozilla. Results in ugly layout. Looks like Mozilla adds extra line breaks. Reproducible: Always Steps to Reproduce: 1. Open http://www.computerra.ru 2. Look at blue and orange lines right from the column headers Actual Results: Mozilla shows 6 lines there Expected Results: Only two lines I could create a small repro for the problem: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <body> <base href="http://www.computerra.ru/images/"> <table width=100% border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" width="100%"> <tr> <td valign="top" width="1%">Word1</td> <td valign="bottom" background="top-title-bgblue.gif" width="1%"><img border="0" src="top-title-bgblue.gif" width="2" height="22">Word2<img border="0" src="top-title-bgblue.gif" width="2" height="22"></td> <td valign="bottom" width="100%" background="top-title-bgblue.gif">&nbsp;</td> </tr> </table> </body> </html>
Status: UNCONFIRMED → NEW
Ever confirmed: true
Confirmed, though this may be an HTML coding error.
Attached file Testcase
Keywords: testcase
The reason Mozilla is inserting "line breaks" is that the specified width (1%) of the first two table cells is too small to enclose the content. IE seems to expand the second cell so that the first image, the text, and the second image are all on the same line; Mozilla wraps the content after the text. This may well be within the scope of the relevant HTML/CSS specs: "A percentage specification (e.g., width="20%") is based on the percentage of the horizontal space available to the table (between the current left and right margins, including floats). Note that this space does not depend on the table itself, and thus percentage specifications enable incremental rendering...If column widths prove to be too narrow for the contents of a particular table cell, user agents MAY [my emphasis] choose to reflow the table." I'd tend to say this is not a bug, but this should probably get a look from one of the layout gurus before closing WONTFIX. Reporter: a suggested solution to the problem is changing the second percentage value to something larger, ~8% or 10%; this makes the cell large enough that Mozilla won't try to wrap the content.
Keywords: testcase
looks like a dupe of bug 32191
Reassigning to attinasi. This is a dup of "images without whitespace between them incorrectly wrap" but I can't find the original.
Assignee: karnaze → attinasi
bug 54565?Good call Bernd. Marking as a dup. *** This bug has been marked as a duplicate of 32191 ***
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
verified dupe of 32191
Status: RESOLVED → VERIFIED
This bug was verified as dupe of 32191, and 32191 was reported as fixed. However, this bug (at page http://www.computerra.ru/) still happens in 0.9.4 (build 2001091303).
Status: VERIFIED → REOPENED
Resolution: DUPLICATE → ---
sould be fixed now - please verify.
Status: REOPENED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
Great, it is the first Mozilla (nightly) build I can use to visit my favorite Web sites and see them the right way. Waiting for first stable build that does it.
Status: RESOLVED → CLOSED
It is unfixed again in 0.9.5. What is going on? It was working fine in dayly builds of 0.9.4
Status: CLOSED → REOPENED
Resolution: FIXED → ---
I removed the quirk in percentage width table cells, and that is what this page has. Accepting and updating summary... (ugh).
Status: REOPENED → ASSIGNED
Summary: Unnecessary line breaks in table layout, ugly result → Unnecessary line breaks in table layout when cell has percentage width specified
Target Milestone: --- → mozilla0.9.9
Keywords: compat, testcase
I'm seeing something similar on http://apple.com/ too (around the animated gif ticker) but the problem seems to have turned up in an unrelated table. Is this the correct bug?
Attached file Apple.com testcase
A window width of <= 1000 pixels is required for the bug to show up.
Sorry, the bug activates on the testcase when the window width < 950 pixels. I'm using Mozilla 0.9.7 under Linux Mandrake 8.0.
Priority: -- → P3
Target Milestone: mozilla0.9.9 → mozilla1.2
attinasi will probably not work on those bugs :-(
Assignee: attinasi → table
Status: ASSIGNED → NEW
QA Contact: amar → madhur
Target Milestone: mozilla1.2alpha → ---
Target Milestone: --- → Future
urls : http://www.computerra.ru , http://apple.com and the testcases all render the layout correctly. Bug must've gotten fixed with some checkin --> marking such
Status: NEW → RESOLVED
Closed: 24 years ago22 years ago
Resolution: --- → FIXED
In the future, please use WORKSFORME when you don't know what fixed the bug.
will do :)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: