When using CSS table layouts with display: table, display: table-row, and display: table-cell, the height of child elements set to 100% is ignored in IE browsers.
Unfortunately, the specification for CSS table layout is unclear about how to handle percentage heights for child elements. As a result, browsers have implemented this behavior differently. In IE, percentage heights for table cells are not recognized.
This inconsistency can cause unexpected results, as seen in the question, where the content inside a table cell doesn't fit as expected in IE.
Since a pure CSS workaround is not feasible due to the interoperability issues, alternative approaches must be considered:
The above is the detailed content of Why Does IE Ignore `Height: 100%` on Table Elements?. For more information, please follow other related articles on the PHP Chinese website!