admin管理员组文章数量:1317909
Have e across this problem when testing some older stuff in IE 11. Example here:
Basically, when you have a display: table-cell
element which has contents positioned absolutely, it works fine until you modify the content of that absolute container. You can see this by clicking one of the table cells in the example.
In Chrome, Firefox and even IE 10 this does not cause a problem, but in IE 11 you can see that the table cell height disappears to 0 and does not e back until you do something like resize the window.
I have tried a hack solution that involved using javascript to alter the cell size and then change it back, but it proved unreliable in the place I applied it. I'd much prefer a CSS based solution if anyone can e up with one.
Have e across this problem when testing some older stuff in IE 11. Example here:
http://codepen.io/Samih/pen/zaqjA
Basically, when you have a display: table-cell
element which has contents positioned absolutely, it works fine until you modify the content of that absolute container. You can see this by clicking one of the table cells in the example.
In Chrome, Firefox and even IE 10 this does not cause a problem, but in IE 11 you can see that the table cell height disappears to 0 and does not e back until you do something like resize the window.
I have tried a hack solution that involved using javascript to alter the cell size and then change it back, but it proved unreliable in the place I applied it. I'd much prefer a CSS based solution if anyone can e up with one.
Share Improve this question edited Feb 27, 2014 at 15:54 Samih asked Feb 27, 2014 at 14:10 SamihSamih 1,0989 silver badges16 bronze badges1 Answer
Reset to default 8I found an answer myself. Applying display: inline-block
to the position: relative
element fixes the problem in IE 11. I've no idea why, mind - but it works!
本文标签: javascriptIE11 Table Cell Height Collapsing With Position Absolute contentsStack Overflow
版权声明:本文标题:javascript - IE11 Table Cell Height Collapsing With Position: Absolute contents - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742029218a2416124.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论