Overflow hidden not working in FF & IE

二次信任 提交于 2019-12-25 07:43:36

问题


I have overflow on the x-axis that I'm trying to hide in a container of display:table. The overflow is hidden in Chrome and Safari. As the title suggests, however, this is not happening in FF & IE 11.

My fiddle: https://jsfiddle.net/z6wLnsas/1/

I have tried both overflow: hidden and overflow-x: hidden, but the issues still persists in the identified browsers.


回答1:


For some reason, the overflow properties do not work on tables. Instead, try putting your table( or div with display: table) in another div.

Something like

<div id='container'>
    <div id='my-table-div'>
    Random content
    </div>
</div>

Then put the overflow property on the container.



来源:https://stackoverflow.com/questions/40710967/overflow-hidden-not-working-in-ff-ie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!