Overflow auto inside a div not working in ie

本秂侑毒 提交于 2019-12-23 12:22:34

问题


This is my code http://jsfiddle.net/FbC86/. If you open this page with Chrome or Firefox the text inside the cell is overflowing correctly through a vertical scrollbar. If you open it with Internet explorer it doesn't work properly.

I need your advice as i am new to web development and i cannot find any solution to this problem. Thanks in advance! Part of the code:

CSS

div.main
{
    width:100%;
    height:100%;
    display:block;
    position:relative;
    overflow:auto;
}
div.transparent{
    padding:3em;
    background-color: rgba(255,255,255,0.7);
    display:block;
}

HTML

...
<td colspan="7" valign="top"  style="height:0;" >
    <div class="main">
    <div class="transparent">
Here goes a long text
</div</div></td>
...

回答1:


You need to add a height attribute to the div you want to overflow.

JSFiddle



来源:https://stackoverflow.com/questions/22755369/overflow-auto-inside-a-div-not-working-in-ie

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