height do not trigger table cell collapse
Below are width:auto; tables which should collapse to fit their contents.
Each table has a cell containing the same large image but with varying width and height properties.
When the image is resized using the CSS width property - leaving height at auto, the table cell collapses properly in both the vertical and horizontal directions.
However, when the image is resized using the CSS height property - leaving width at auto, the table cell only collapses properly in the vertical direction.
The width of the cell remains the same as if the image had not been resized at all.
Table image 1width:auto;
|
![]() |
|---|
Table image 2width:200px;PASSES |
![]() |
|---|
Table image 3width:500px;PASSES |
![]() |
|---|
Table image 4width:auto;FAILS |
![]() |
|---|
Table image 5width:auto;FAILS |
![]() |
|---|
<div> test
This <div> has been given a float property of left so it should collapse in a similar manner to the table cells above.
Unlike the examples above, box collapsing when a contained image is resized by height seems to work properly.