Open
Bug 199385
Opened 21 years ago
Updated 2 years ago
DIV inside a table cell is aligned according to HTML align rule, regardless of CSS margin rule
Categories
(Core :: Layout: Block and Inline, defect)
Core
Layout: Block and Inline
Tracking
()
NEW
People
(Reporter: martin, Unassigned)
References
()
Details
Attachments
(1 file)
884 bytes,
text/html
|
Details |
User-Agent: Opera/6.05 (Windows XP; U) [en] Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4a) Gecko/20030326 When i use align="center" in table cell and have DIV inside that cell which has a margin-left property set, Mozilla(both 1.3 and the latest nightly on WIN xp) aligns the DIV to the center of the cell, NOT taking into account that margin-rule is set. While I think it should, because: a)CSS should overwrite HTML properties b)CSS rule is applied to the nested element, while the HTML rule is applied to the container element Reproducible: Always Steps to Reproduce: 1.make a html table with one cell(width: 320) and set align="center" to it 2.inside that sell, make a DIV(width: 300) and set margin-left: 20px; Actual Results: you should see div aligned 20px from the left border of the cell, instead you see it centered Expected Results: place the DIV 20px from the left border of the table cell
Comment 1•21 years ago
|
||
Looking at the computed style, our HTML-to-style mapping is converting align="center" to "text-align: -moz-center". How -moz-center is supposed to work, I don't know...
this has nothing to do with tables, see testcase
Assignee: table → block-and-inline
Component: Layout: Tables → Layout: Block & Inline
QA Contact: madhur → ian
Comment 4•21 years ago
|
||
This seems to be related to Bug 185411: in the test case, if you change the border CSS of the DIVs to be 'border-top' only, or remove the border entirely, the alignment of the DIV is as expected in either a DIV or table-cell container. Not quite a dupe, tho, I don't think. I'm confirming this bug Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4a) Gecko/20030401 (also in 1.3 Final)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•21 years ago
|
OS: Windows XP → All
Hardware: PC → All
Comment 5•21 years ago
|
||
The fix for bug 185411 is now in 1.7a builds. The third item in the test case attached to this bug used to render incorrectly, but now renders as reporter expected; but the second item's DIV is still centered -- which is this bug. And again, if the border is changed to 'border-top' across the board, all divs are positioned correctly.
Updated•15 years ago
|
Assignee: layout.block-and-inline → nobody
QA Contact: ian → layout.block-and-inline
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•