Closed Bug 1802 Opened 26 years ago Closed 25 years ago

<tr align=left/right/center> not working

Categories

(Core :: Layout: Tables, defect, P2)

All
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: unapersson, Assigned: karnaze)

References

Details

(Whiteboard: [PDT+])

Attachments

(2 files)

In the below example the text in the second row should be centered, and the third row should be aligned to the right: <table border=1> <tr><td>AAA<td>BBB <tr align=center><td>A<td>B <tr align=right><td>A<td>B </table>
Status: NEW → ASSIGNED
Assignee: buster → peterl
Status: ASSIGNED → NEW
The solution has multiple steps. 1. Change UA.CSS. TD,TH * set text align to "default" value. May need to invent a default value to set it to. * change valign to inherit TH * remove text align TR, TBODY, THEAD, TFOOT * valign inherit COL * valign, background, border, width, visibility all inherit * change "COL" selector to "COL, :TABLE-COLUMN" * probably change other table selectors to include their pseudo-style selector as well? 2. Change style struct so the init value of valign is "unset". All uses of valign need to be fixed up to account for "unset" 3. Table code needs to change. valign Cells need to check their own style struct valign and use it if it is set. Else, look at the cell's COL valign and use it if it is set. Else, use a hard coded default of "middle" align Cells need to check their own style struct align and use it if not "default" Else, look at the cell's ROW align and use it if set. Else, look at the cell's COL align and use it if set. Else, use a hard coded default based on the content tag ("left" for TD, "center" for TH) Implementation Strategy Peter will do steps 1 and 2 when the coast is clear. I have just done 3, since it does no harm at this point. The proper inheritence will just work once Peter does the first 2 steps, although part of the code is #ifdef'd out right now. Remove the #ifdef after Peter's change.
I have been writing test cases for the THEAD, TBODY and TFOOT elements. The ALIGN-center and ALIGN-right attribute/values do not work. Is this the same bug?
Setting all current Open/Normal to M4.
*** Bug 2962 has been marked as a duplicate of this bug. ***
per leger, assigning QA contacts to all open bugs without QA contacts according to list at http://bugzilla.mozilla.org/describecomponents.cgi?product=Browser
*** Bug 3260 has been marked as a duplicate of this bug. ***
Status: NEW → ASSIGNED
Target Milestone: M4 → M6
This behavior is seen at http://www.amazon.com. There is an align=center attribute value in both of the TR element tags in the first table. This is causing the two images (contained in the table) to not align properly.
Summary: <tr> left/right/center alignment not working → [4.xP]<tr> left/right/center alignment not working
Adding Product Parity code at beginning of Summary section in regards to the Amazon.com page. Bug occurs on all platforms (4/8 build) in Seamonkey but not in Comm 4.51 or IE. Here is an isolated case: <html> <head> <title>1802</title> </head> <body> <table border=0 width=100% cellspacing=0 cellpadding=0> <tr align=center bgcolor="yellow"> <td>Some text </td> </tr> <tr align=center bgcolor="lime"> <td>Some text </td> </tr> </table> </body> </html>
Hardware: PC → All
*** Bug 5285 has been marked as a duplicate of this bug. ***
Target Milestone: M6 → M7
*** Bug 5819 has been marked as a duplicate of this bug. ***
*** Bug 709 has been marked as a duplicate of this bug. ***
*** Bug 7392 has been marked as a duplicate of this bug. ***
*** Bug 6731 has been marked as a duplicate of this bug. ***
*** Bug 3733 has been marked as a duplicate of this bug. ***
Blocks: 4355
No longer blocks: 4355
*** Bug 2386 has been marked as a duplicate of this bug. ***
*** Bug 11225 has been marked as a duplicate of this bug. ***
Deferring to M10
*** Bug 14317 has been marked as a duplicate of this bug. ***
Attached file test case from bug 14317 (deleted) —
*** Bug 16323 has been marked as a duplicate of this bug. ***
*** Bug 16184 has been marked as a duplicate of this bug. ***
Reassigning peterl's bugs to myself.
Accepting peterl's bugs that have a Target Milestone
Blocks: html4.01
Summary: [4.xP]<tr> left/right/center alignment not working → [4.xP]<tr align=left/right/center> not working
[Adjusting summary to be easier to find. Adding HTML4 compliance dependency.]
*** Bug 18401 has been marked as a duplicate of this bug. ***
Pushing my M15 bugs to M16
Target Milestone: M16 → M15
Moving table bugs to M15 just to see how many we have. Besides, it may help to find duplicates.
in html.css remove text-align:left from td,th td, th { vertical-align: inherit; display: table-cell; } and this works just fine. testet on winnt,9x with build 1999122808. any comments ?
Works for me as well, is removing this likely to cause any problems elsewhere? It looks as though the stylesheet defaults in html.css have priority in the cascade over presentational HTML. Should this be the case? If not, is this another more serious bug?
Deleting those lines also fixes the problem for me. I don't see anything else affected by this, but I don't know.
Removing this single line from html.css works for me also. Changing 'left' to 'inherit' also seems to correct the problem.
Deleting those lines is not the complete solution. See buster's comment dated 1999-03-01.
Deleting this line or changing to text-align: inherit works for me. another problem is that the table!! gets the text-align value from the inherit element (another known bug) -> possible solution adding text-align: left to the table element. changing text-align: inherit at the td, th elements
*** Bug 24620 has been marked as a duplicate of this bug. ***
*** Bug 19521 has been marked as a duplicate of this bug. ***
*** Bug 24772 has been marked as a duplicate of this bug. ***
Setting the keyword all open [4.xp] bugs to 4xp.
Keywords: 4xp
*** Bug 25648 has been marked as a duplicate of this bug. ***
*** Bug 25788 has been marked as a duplicate of this bug. ***
*** Bug 25801 has been marked as a duplicate of this bug. ***
A warning: default text alignment would be right, not left, if the user is using a right-to-left language. Coding left alignments in multiple places in the style sheet might not be a good idea.
Summary: [4.xP]<tr align=left/right/center> not working → <tr align=left/right/center> not working
*** Bug 26837 has been marked as a duplicate of this bug. ***
The behavior of 4.x is rather tricky to duplicate using CSS. See the above attachment. However, this needs to be worked on. See related bug 7112. (Why didn't I know about this bug a year ago?)
Adding 'beta1' keyword - HTML 4.0 elements and attributes should work in beta1 per beta criteria document.
Keywords: beta1
looks like PDT+ based on dup count. Rick G. please re-review. Please add estimated completion date pierre.
Whiteboard: [PDT+]
Pierre, I'm going to take this one and try to make it work within the confines of the table code while considering bugs 915 and 7112. Later, if there is a more elegant style solution, we can deal with it. These align bugs have been in the system far too long.
Assignee: pierre → karnaze
Severity: normal → major
Status: ASSIGNED → NEW
Target Milestone: M15 → M14
Ignore the last half of my previous comments regarding a non elegant solution. This was fixed by changing html.css and adding a custom style rule to the style code.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Verified FIXED with build 2000021708 on Windows NT 4.0 sp6. From the top: All code snippets and attachments in this bug works fine. bug 2962: URL works fine. Code snippet works fine. bug 3260: Code snippet works fine. http://www.amazon.com works fine. bug 5285: Crash consistently on the URL. Created bug 28397. bug 5819: URL (amazon.com) and code snippet works fine. bug 709: Code snippet works fine. bug 7392: URL does NOT look good - reopened bug 25630. bug 6731: URL works fine. bug 3733: URL works fine. bug 2386: URL and testcase works fine. bug 11225: URL and testcase works fine. bug 14317: URL and testcase works fine. bug 16323: URL works fine. bug 16184: URL works fine. bug 18401: URL and testcase works fine. bug 24620: URL shows minor 4xp problem but TR align works. Created bug 28410. bug 19521: URL and testcase works fine. bug 24772: Testcase works fine. bug 25648: Testcase relating to TR align works fine, rest is dup of bug 7471. bug 25788: URL works fine. bug 25801: URL works fine. bug 26837: URL works fine.
Status: RESOLVED → VERIFIED
*** Bug 26198 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.

Attachment

General

Creator:
Created:
Updated:
Size: