Closed Bug 195270 Opened 22 years ago Closed 22 years ago

display: inline tables cause screwy width/height calculations

Categories

(Core :: Layout: Tables, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 135994

People

(Reporter: dpotter, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3b) Gecko/20030130 When a table is set to display: inline, the tables width/height are (badly) miscalculated, causing the tables to possibly float all over each other and the contents to look extremely strange. I'm assuming that the borders and backgrounds being drawn are based on the calculated height/width, but even then, the boxes still overlap. Reproducible: Always Steps to Reproduce: 1. Create a table, set display: inline 2. Give enough content, maybe a couple of lines, to make the box reasonably sized 3. Give it a border (through CSS) and a different colored background to make this stand out Actual Results: The table may appear over other elements, the background/border will not correspond to the content. Expected Results: The table should be laid out as a normal table, and then should be placed into the flow as normal, with the remaining blocks on the line flowing horizontally. The next lineblock should be completely below the table. None of the tables contents should extend vertically above it's current ancestor block. This is how IE6 handles display: inline on tables. I suppose this could be invalid due to the existance of the inline-table display type. However, current behavior does not give an acceptable result. My reading of the specs indicate that the structure linked to should cause an "anonymous table" to be generated around the <tbody> elements, possibly causing the page to display as-if "display: table" had been set on the <table> element instead of "display: inline". I think "display: inline" on a table element can be effectively considered to be "display: inline-table", as a child of the "inline" table block will be created that is an "anonymous table" display block, but I'm not completely sure. Treating it as "display: table" is probably an acceptable compromise, in that it keeps the content visible, albeit too tall.
*** This bug has been marked as a duplicate of 135994 ***
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.