Closed Bug 18545 Opened 26 years ago Closed 24 years ago

[FLOAT] Problem Centering <TABLE> with <DIV> tag

Categories

(Core :: Layout, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED WORKSFORME
Future

People

(Reporter: unapersson, Assigned: buster)

References

()

Details

(Keywords: testcase)

Attachments

(4 files)

Applying align=center or text-align: center to a DIV tag does not center tables within it. Using a <center> tag, which is a "shortcut" for <div align=center>, however does work. See testcase for examples
Assignee: troy → karnaze
Assignee: karnaze → kipp
This is a block or line problem. Reassigning.
Updating to default Layout Assignee...kipp no longer with us :-(
Why are you re-reassing layout bugs? Do NOT touch layout bugs. The bugs are assigned to Kipp so they can stay neatly organized until we have a new owner for the block/inline code.
QA Contact: petersen → chrisd
mass moving all Kipp's pre-beta bugs to M15. Nisheeth and I will prioritize these and selectively move high-priority bugs into M13 and M14.
Summary: Problem Centering <TABLE> with <DIV> tag → [FLOAT] Problem Centering <TABLE> with <DIV> tag
mine! mine mine mine! all mine! whoo-hoo!
Assignee: kipp → buster
Attached file better test case
the fix for this is to account for both NS_STYLE_TEXT_ALIGN_MOZ_CENTER and NS_STYLE_TEXT_ALIGN_CENTER in nsBlockReflowContext::AlignBlockHorizontally(). Same for NS_STYLE_TEXT_ALIGN_MOZ_RIGHT, while I'm at it.
Status: NEW → ASSIGNED
Whiteboard: fix in hand
moving all buster m15 bugs to m16.
Target Milestone: M15 → M16
fix checked in. should be able to verify against 4/17/00 build.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Whiteboard: fix in hand
Verified. Windows: 2000-07-13-09-M17 NOT fixed for Linux. Verified on 2000-07-13-08-M17 build. The text and the cell are left justified for 2nd and 4th row. But, they should be centered and right aligned respectively.
Group: netscapeconfidential?
OS: Windows NT → Linux
Group: netscapeconfidential?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Reopening per Bindu's last comments.
extremely odd. this is totally xp code. I don't know why linux would behave differently. how does mac look?
Note that I changed some of the behavior when fixing bugs 37083 and bug 40038 (so that 'text-align: center' doesn't center blocks, since there was no evidence that real sites depended on that quirk).
needs investigation. won't make RTM, marking Future.
Status: REOPENED → ASSIGNED
Target Milestone: M16 → Future
On my Linux trunk build from a few days ago, all the testcases are correct as I think they should be in both quirks and standard mode (HTML's align centers blocks, CSS's text-align works according to the CSS spec).
Upon managerial request, adding the "testcase" keyword to 84 open layout bugs that do not have the "testcase" keyword and yet have an attachement with the word "test" in the description field. Apologies for any mistakes.
Keywords: testcase
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; m18) Gecko/20001220 BuildID: 2000122004 text-align: when applied to block elements affects their inline content, not the element itself, as per http://www.w3.org/TR/REC-CSS2/text.html#propdef-text-align <TABLE> is a block element NOT an inline element as defined in HTML: http://www.w3.org/TR/html4/strict.dtd http://www.w3.org/TR/html4/loose.dtd I agree with David Baron. tables in 2nd and 4th rows *should* be left justified To center the tables themselves { margin-left: auto; margin-right: auto; } should be applied. This bug seems to be fully resolved and works correctly for me.
The auto margins go on the table itself, not the div containing the table.
OK. Removing the DIV around the table and adding the definition 'TABLE {margin- left: auto; margin-right: auto;}' to my style element causes part of the table to be centered: the caption is still off at the left of the page. The inline caption element is contained within the block table element. Is this a different bug? Mozilla/5.0 (Windows; U; WinNT4.0; en-US; m18) Gecko/20001228
It's not a bug. CSS2 17.4.1 says: "Captions above or below a 'table' element are formatted very much as if they were a block element before or after the table, except that (1) they inherit inheritable properties from the table, and (2) they are not considered to be a block box for the purposes of any 'compact' or 'run-in' element that may precede the table." You'd need to add the same auto margins to the caption.
I understand. Thank you for your patience. I agree that this bug is resolved.
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
Can someone re-close this bug and mark it as FIXED?
Status: ASSIGNED → RESOLVED
Closed: 25 years ago24 years ago
Resolution: --- → WORKSFORME
WORKSFORME on Win32 Netscape Commercial Build 2001030308. WORKSFORME on Linux Netscape Commercial Build 2001030608. (tested both quirks and standards mode)
vrfy
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: