Closed
Bug 84305
Opened 24 years ago
Closed 22 years ago
text in cells in table inside div with text-align:right not right aligned
Categories
(Core :: Layout: Tables, defect)
Tracking
()
VERIFIED
WONTFIX
Future
People
(Reporter: conorlennon, Assigned: karnaze)
References
Details
(Keywords: testcase, Whiteboard: [awd:tbl])
Attachments
(4 files, 1 obsolete file)
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.1+) Gecko/20010605
BuildID: 2001060520
'Right Aligned' in the following html is not right-aligned.
<html>
<body>
<DIV style="text-align : right">
<TABLE>
<CAPTION>Right Aligned</CAPTION>
<TR>
<TD>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</TD>
</TR>
</TABLE>
</DIV>
</body>
</html>
Reproducible: Always
Steps to Reproduce:
1. Load html
Actual Results: Text is not right-aligned
Expected Results: Text should be right-aligned
Reporter | ||
Comment 1•24 years ago
|
||
Comment 2•24 years ago
|
||
Is this valid? I'm not sure if table cells should inherit a surrounding
text-align, hixie or dbaron care to give the verdict?
Anyhow, attaching a better testcase - Conor's doesn't work because the table is
collapsed.
OS: Windows NT → All
Comment 3•24 years ago
|
||
Comment 4•24 years ago
|
||
They should, and I believe they used to. Could this have been messed up in
hyatt's branch landing? (Or maybe it never worked, but I really think it did.)
Comment 5•24 years ago
|
||
The testcase has identical appearance in builds of 06/05, 05/30, 05/19, 03/13
on win2k, with either a strict DTD, or with no DTD.
not 100% convinced that this an actual table issue...
Whiteboard: [awd:tbl]
This HTML page shows the failure of right alignment in the TD element.
The only complaint Tidy (the W3 Org compliance checker) has about this HTML
code is that the table element has no ``summary'' attribute.
This bug may be related to a bug I have observed, see the URL...
http://www.dvc.org.uk/~johnny/jeff/mjeff9.html
for an example... I believe the right aligning for <td ALIGN="RIGHT">
is broken for the last line of text in the table cell. For instance, IE 5.0
renders the page with all lines correctly right aligned as I would expect, as
does Netscape 4.7.
Comment 9•23 years ago
|
||
I don't see anything wrong with attachment 63132 [details] except for the failure to
remove trailing whitespace, which I'm pretty sure is already filed as a separate
bug, and is in any case unrelated to this bug.
Comment 10•23 years ago
|
||
We render this identical to IE
http://lxr.mozilla.org/seamonkey/source/layout/html/document/src/quirk.css#105.
We specially cut inheritance in quirks mode.
Comment 11•23 years ago
|
||
The caption is not right aligned because it has a text-align: center in the
html.css so it would not inherit. And captions are expexted to be centered see
CSS2 spec the table in sect. 17.7.1. For me this bug is either invalid or better
should go to evangelism.
Assignee | ||
Comment 12•23 years ago
|
||
Temporarily moving to future until a milestone can be assigned.
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Comment 13•22 years ago
|
||
I came across this bug when inheriting the text-align style from a TD
rather than a DIV. This attachment is a testcase showing this.
Expecting inner table to be centered (it is, for example, on IE) but on
Mozilla (eg v 1.0) it is left aligned.
Comment 14•22 years ago
|
||
Can I suggest that this bug be upgraded in priority & milestone?
Isn't this fairly basic breakage wrt the CSS1 (and CSS2) spec?
Comment 15•22 years ago
|
||
Comment on attachment 92932 [details]
Testcase TD testcase
Mozilla's display of this testcase is correct. The table should not be
centered. The 'text-align' property applies only to inline content. To center
a block or a table, use 'auto' horizontal margins.
Attachment #92932 -
Attachment is obsolete: true
Attachment #92932 -
Flags: needs-work+
Comment 16•22 years ago
|
||
Okay, sorry, I didn't notice that the behaviour has changed in CSS2.
In CCS1 the description for text-align says
"Since 'text-align' inherits, all block-level elements inside the 'DIV' element
... will be centered."
In NS4.75 this is what happens. But the new behaviour still happens with
Mozilla in nav quirks mode. Is that a bug?
Comment 17•22 years ago
|
||
The "will be centered" you quote is some loose wording that uses "be centered"
to mean "have a text-align of center". It should be clear from the sections on
margin in CSS1 that this is not a change.
However, this discussion is unrelated to this bug and should move elsewhere if
it continues.
Comment 18•22 years ago
|
||
Okay, thanks David. Created bug 160034 for the quirks mode issue.
Comment 19•22 years ago
|
||
Comment 20•22 years ago
|
||
As shown in attachment 104940 [details] the text-alignment is inherited in strict mode and
not inherited in quirks mode as described in comment 10. Comment 15 indicates
that we should not use text align to align blocks.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → WONTFIX
Reporter | ||
Updated•18 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•