Table isn't aligned right/center inside another table if text-align:right/center is used

VERIFIED INVALID

Status

()

Core
Layout: Tables
VERIFIED INVALID
15 years ago
13 years ago

People

(Reporter: Ulrich Voigt, Unassigned)

Tracking

({testcase})

Trunk
x86
Windows XP
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030827
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030827

If you define a table inside a cell of another table, text-align is not
considered. The inner table is always left-aligned.

Reproducible: Always

Steps to Reproduce:
1. Load testcase

Actual Results:  
Inner table in row 1 is left-aligned. WRONG
Inner table in row 2 is centered. Correct
Inner table in row 3 is left-aligned. WRONG
Inner table in row 4 is right-aligned. Correct
Text in row 5 is centered. Correct

Expected Results:  
Inner table in row 1 and 2 should be centered.
Inner table in row 3 and 4 should be right-aligned.
Text in row 5 should be centered.
(Reporter)

Comment 1

15 years ago
Created attachment 130749 [details]
Testcase 1

Testcase for the 1st bug-description

Comment 2

15 years ago
Text-align sets alignment for inline content of a block.  A table is not an
inline element.
http://www.w3.org/TR/CSS21/text.html#propdef-text-align

Set the table's left and right margin to auto to produce a centering effect.

I think something similar produces a right alignment, but I haven't played with it.

As it stands, bug is invalid.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → INVALID

Comment 3

15 years ago
margin-left:auto on the table will make it right aligned.

Verified invalid.
Status: RESOLVED → VERIFIED
Keywords: testcase

Comment 4

15 years ago
Reporter adding a strict doctype would show more clearly that the text
text-align influences the text inside the table, in quirks mode the inheritance
is broken at the the table level.

Comment 5

13 years ago
*** Bug 307272 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.