Closed Bug 24506 Opened 20 years ago Closed 20 years ago
Table Column Width Calculation Wrong
It happens, that the layout engine wraps contents in tables, although it could be prohibited by increasing the width of the column, as the width of the table is smaller than the width of the window. In the following example, the two words are displayed in two separate lines, even if the window is much larger than the table. If you remove the margins in the embeded <div> tag, then it will be formatted correctly in a single line. I don't know how the layout engine works. I assume that during the formatting, the table cell asks its contents about its optimal width. If there are no other constraints (limited space, larger widths of other cells in the same column etc.), the cell would resize the column width to that value. In a later step, the contents of the cell are requested to format themself to the given width. Eventually, there is a bug in the first step and the margins of the <div> tag are not considered. So the calculated width is too small and the contents need to wrap to fit into the given width. <html> <body> <table border=1> <tr> <td><div style="margin-left: 4px; margin-right: 4px" >Word1 Word2</div></td> </tr> </table> </body> </html> Build: Windows, 2000011908, but also seen in many previous versions.
Fixed the block code to include the right margin
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Fixed in the May 30th builds.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.