Closed
Bug 18401
Opened 25 years ago
Closed 25 years ago
TD elements not inheriting %cellhalign from TR elements
Categories
(Core :: Layout: Tables, defect, P3)
Tracking
()
People
(Reporter: sidr, Assigned: karnaze)
References
()
Details
(Whiteboard: [testcase])
Attachments
(1 file)
1.55 KB,
text/html
|
Details |
Summary: The %cellhalign attribute, defined by the TR section of the HTML spec <URL:http://www.w3.org/TR/REC-html40/struct/tables.html#h-11.2.5> as applying to <TR> elements as well as <TD> and <TH> elements, is having no effect on horizontal alignment within <TD> cells enclosed in a <TR>. The comment for this attribute of the <TH> element "-- horizontal alignment in cells --" strongly implies that it is meant to apply to <TD> and <TH> cell contents, but more importantly, the sum of the widths of the cells in a row is always equal to the width of the row, so alignment applied to <TH> cannot apply to <TD> and <TR> cells, so, by elimination, it must apply to the contents of those elements. Mozilla is incorrectly left-aligning the contents of all <TD> cells when that cell has no horizontal alignment specified, when the <TR> that <TD> is enclosed by does have a different horizontal alignment specified. This shows up strikingly on the U.S. Government Printing Office's webpage for viewing, downloading, or ordering the "Findings of Fact" prepared by Judge Jackson for the U.S. v. Microsoft Antitrust case <URL:http://usvms.gpo.gov/> Reduced testcase following immediately showing how Mozilla is getting this wrong whether the horizontal alignment is specified by HTML attributes or CSS properties, but getting it right outside of tables. Here are the relevant DTD snippets for <TR> and %cellhalign. <!ELEMENT TR - O (TH|TD)+ -- table row --> <!ATTLIST TR -- table row -- %attrs; -- %coreattrs, %i18n, %events -- %cellhalign; -- horizontal alignment in cells -- %cellvalign; -- vertical alignment in cells -- > <!ENTITY % cellhalign "align (left|center|right|justify|char) #IMPLIED char %Character; #IMPLIED -- alignment char, e.g. char=':' -- charoff %Length; #IMPLIED -- offset for alignment char --" > (This would get really annoying if the "char" attribute were also used in a financial info table where all but one cell pe row was aligned on ".") Steps to reproduce: View the URL above or the teatcase. Actual Results: The contents of <TD> cells are always left-aligned unless otherwise specified for that cell, regardless of the horizontal alignment specified for the parent <TR> element. Expected Results: The horizontal alignment of the contents of <TD> cells is always the same as that specified for the parent <TR> element unless otherwise specified for that cell. Does not work correctly with: 1999-11-08-09-M11 nightly binary on Windows NT Work correctly with: IE5 on Windows NT NN 4.7 on Windows NT (for ALIGN attribute but not CSS text-align property)
Reporter | ||
Comment 1•25 years ago
|
||
Reporter | ||
Updated•25 years ago
|
Whiteboard: [testcase]
Reporter | ||
Comment 2•25 years ago
|
||
Oops. Obviously I meant <TR>, not <TH> in the first line of << The comment for this attribute of the <TH> element "-- horizontal alignment in cells --" strongly implies that it is meant to apply to <TD> and <TH> cell contents >> Testcase added.
Reporter | ||
Updated•25 years ago
|
Summary: TD elements not inheriting %cellhalign from TH elements → TD elements not inheriting %cellhalign from TR elements
Updated•25 years ago
|
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 4•25 years ago
|
||
Verifying bug dup of #1802
You need to log in
before you can comment on or make changes to this bug.
Description
•