Closed
Bug 36022
Opened 24 years ago
Closed 24 years ago
text-align:center and tables
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
VERIFIED
FIXED
M16
People
(Reporter: ekrock, Assigned: buster)
References
Details
(Keywords: css1)
Attachments
(4 files)
[ I'm forwarding this CSS bug report by armin.birrer@gmx.net from netscape.beta.feedback.pagelayout for analysis. The reporter's not registered in Bugzilla.] Operating System: Windows 95 Language: English Issue Summary: CSS:div.center{text-align:center;} does not work Component: Page Layout Doing What: Browing web pages Severity: Something didn't work right Can Reproduce: Yes, Always Try this URL: http:// Issue Detail: center tag does not work correctly ********************************** Using the center tag in CSS Class, it does not work CSS-File: ********* div.center { text-align:center; } HTML-File: ********** <div class="center"> Sample Text </div> Comment: ******** This works properly in Netscape 4.72 (also Opera 3.62 and IE 5.0) But NOT in the new Netscape 6 Pre-Release 1 English Build 6.0.15-nb1b.2000033112 Email Address: armin.birrer@gmx.net
Comment 1•24 years ago
|
||
Comment 2•24 years ago
|
||
Hmm, the one-file testcase works fine using the latest M16 build, an M15 build from 2000-04-06, and the M14 release build. Could this only be a problem when the CSS is in a seperate file?
Reporter | ||
Comment 3•24 years ago
|
||
Sounds like it as the reporter seems to have been using separate files.
Comment 4•24 years ago
|
||
Comment 5•24 years ago
|
||
The bug only appears if the CSS TAG "div.center { text-align:center; }" is used to centre a table. It doesn't matter whether the CSS is in a seperate file or not.
Comment 6•24 years ago
|
||
Confirming this on Linux build 2000.04.16.06. text-align: center, according to the CSS2 spec, should center inline content of the DIV. Maybe a TABLE isn't inline content? However, changing the TABLE to <TABLE style="display: inline-table">, which presumably makes it into inline content, also doesn't make the table centered.
Comment 7•24 years ago
|
||
CC to reporter; changing summary.
Summary: div.center { text-align:center; } fails on PR1 → text-align:center doesn't center table
Mozilla doesn't support inline-table. text-align should not center blocks. However, it might do so in quirks mode (I think actually buster changed it to do it in all cases, which is wrong...).
Comment 10•24 years ago
|
||
Well, on yesterday's build text-align: center makes tables centered even in strict mode. I'll reassign this to buster as per dbaron's comments. To summarize what this bug is about: text-align: center should not (as per spec) center a table in strict mode (it does right now). Should it center tables in compatibility mode?
Assignee: pierre → buster
Summary: text-align:center doesn't center table → text-align:center and tables
Comment 11•24 years ago
|
||
Comment 12•24 years ago
|
||
Keywords: css1
Comment 13•24 years ago
|
||
Compatibility mode detection is broken now. See bug 36872. But even if using the viewer, table with 'text-align: center' is centerd. It should not be centered per spec.
Depends on: 36872
Comment 14•24 years ago
|
||
Bug 36872 is fixed, but table is still centered.
Assignee | ||
Comment 15•24 years ago
|
||
fixed. compatibility mode still centers the table, but strict mode does not
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Whiteboard: fix in hand
Comment 16•24 years ago
|
||
Using the following builds: Windows: 08_09_09_m18 Mac: 08_08_20_m18 Linux: 08_10_08_m18 reopening bug. Using the testcases provided, 'strict' mode correctly DOES NOT center top table. However, in 'transitional' or 'quirk' mode, the beahvior is the same - top table is not centered. I understood from this bug that in 'quirk' mode 'text-align: center' should center the block as well as the text.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I actually changed this back when I fixed some other centering bugs. Nav4's behavior was incorrect according to the CSS spec. If you can point to more than one or two real sites that depend on that behavior I'm willing to change it back for quirks mode, but otherwise I think this bug should be resolved as INVALID. I don't think there's a need to copy Nav4's bugs just because one person filed abug saying they should be copied. I think very few sites use the CSS 'text-align: center' for centering tables because HTML's CENTER element or <DIV ALIGN=CENTER> or <TABLE ALIGN=CENTER> are more reliable across browsers than CSS.
Assignee | ||
Comment 18•24 years ago
|
||
I agree with David's last comment. Our quirks mode is intended to replicate existing Nav4 behavior in HTML markup (and sometimes IE behavior where Nav is just completely broken). It is absolutely not intended to mimic legacy behavior for CSS. So it's the right decision to make <CENTER> behavior like Nav4 in quirks mode, because it's a common idiom. But it doesn't make much sense to intentionally break CSS in quirks mode for an idiom that isn't in common usage. I'm marking this bug Fixed again, to indicate that the portion of the bug report that ought to be fixed has been fixed.
Status: REOPENED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → FIXED
Comment 19•24 years ago
|
||
Netscape's standard compliance QA team reorganised itself once again, so taking remaining non-tables style bugs. Sorry about the spam. I tried to get this done directly at the database level, but apparently that is "not easy because of the shadow db", "plus it screws up the audit trail", so no can do...
QA Contact: chrisd → ian
Updated•23 years ago
|
QA Contact: ian → amar
You need to log in
before you can comment on or make changes to this bug.
Description
•