Closed Bug 60479 Opened 25 years ago Closed 25 years ago

Table renders incorrectly with margins=0 on body tag

Categories

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

x86
Windows 2000
defect

Tracking

()

VERIFIED WONTFIX

People

(Reporter: vsalvador, Assigned: karnaze)

Details

Attachments

(1 file)

Table attached renders incorrectly because second row are not showed. IE 4&5 shows OK and NS4 shows incorrectly but better than mozilla. Try this code on IE and you will see how it must to be rendered. getting rid of LEFTMARGIN='0' TOPMARGIN='0' MARGINWIDTH='0' MARGINHEIGHT='0' tags then mozilla renders OK <HTML> <BODY LEFTMARGIN='0' TOPMARGIN='0' MARGINWIDTH='0' MARGINHEIGHT='0'> <TABLE BORDER='1' CELLSPACING='0' CELLPADDING='0' HEIGHT='100%' WIDTH='100%'> <TR HEIGHT='100%'> <!-- The height on the td tag is necessary for NS4 compatibility --> TD HEIGHT='100%'>TOP ROW</TD> </TR> <TR HEIGHT='20'> <TD HEIGHT='20'>BOTTOM ROW</TD> </TR> </TABLE> </BODY> </HTML>
I forgotten this info: Mozilla {Build ID: 2000111620} Platform: Windows 2000 Reproducible: Always
This works for me. The only difference I see with IE is that Mozilla renders the "Bottom Row" just under the "first screen". To view the "Bottom Row", I have to scroll down a few. In, IE the Bottom Row is displayed inside the "first screen", but everything else works just fine. The margin attributes do what they're supposed to do. Removing these attributes just inserts a margin... Fabian.
This should be marked as WFM because the given height for the first table cell is 100% so the height is basically the window screen height (body). The second row is displayed at 20. Forcing you to scroll below initial screen. This is what I would expect. THe better way to code this would be setting something like row1-->95% and row2-->5%.
Not really. Table height should constraint all inner row heights. Fabbian Guisset says: To view the "Bottom Row", I have to scroll down a few. Yeah!! That's what the web programmer doesn't wants. With this code, browser should render a table with 100% height. That is: with the current browser screen height. Then it should render a row with height 100% of container. This is a 100% of the table height, but the code has another row with height 20 so the height of first row should be reduced by 20. Think about widths. This should be the same. Look at this code: <TABLE WIDTH='100%'> <TR> <TD WIDTH='100%'>ROW 1</TD> <TD WIDTH='20'>R2</TD> </TR> </TABLE> I can see row2 at the right of the browser screen and I cannot need to scroll right to see the second row. This allows to create table with a small column of width 20 constrained to the right of the browser screen. Original bug code allows to create a small row with width 20 constrained to the bottom of the browser screen. That's why this bug should not be marked as WFM.
Other commect to fabian... You said: Removing these attributes just inserts a margin... If you see at the first row height if you insert the TOPMARGIN='0' MARGINWIDTH='0' MARGINHEIGHT='0' tags, first row height is full body height. When you put this tags, browser insert the margin but first row height is less than previous example, and I can see part of the second row. Anyway, this should render correctly in both cases (like IE) because inheritance should be maintained also with height attribute like browser does with width attribute.
"Not really. Table height should constraint all inner row heights." Where do you see this described in the w3 spec for overflows? The problem is you set row1 height to 100% of the table height also set to 100%. Any other content like row2 is overflowed. Where does it say in the spec that the way to handle the overflowing is to reduce the first row? I have come to understanding that just because IE renders it one way does not make it correct way. Mozilla is rendering this "correct" given the poor page design.
OK. You're right. On http://www.w3.org/TR/REC-CSS2/tables.html Section 17.5.3 (Tables - CSS2 specification) W3C says: CSS2 does not define what percentage values of 'height' refer to when specified for table rows and row groups. I've said the IE example just like and example but I'm not a M$ supporter. I think that Mozilla should render rows and columns with the same algorithm. I've enclosed before a sample with rows and not mozilla, NS4 or IE renders the row at the right of the browser visible window. I assume that my code is not proper. So, please help me to implement what I want. I would like an web page with a taskbar of 20 pixels at the bottom of the browser window and web content on the main row. When I resize the browser, my taskbar should remain at the bottom of the browser window and the main content can reflow. Please help me!!! Hi Mozilla guys, have you any comment about this bug?
Marking WONTFIX because of the already stated comments above. If you need help rendering your page as desired try a newsgroup. There are many NG's that will be very helpful :-) Thanks.
Status: UNCONFIRMED → RESOLVED
Closed: 25 years ago
Resolution: --- → WONTFIX
I think making this as RESOLVED is not a proper solution. But I assume it. Maybe when you have less bugs you can have time to solve this.
QA contact update
QA Contact: chrisd → amar
The table in the given test case is rendering correctly with margins=0.. Verifed on Build ID # 2001-07-27-00-0.9.2 Plat form : WIN2K Marking verified
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: