Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Overflow auto inside a div not working in ie

Tags:

html

css

overflow

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>
...
like image 297
dimitrisd Avatar asked Mar 31 '14 07:03

dimitrisd


1 Answers

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

JSFiddle

like image 117
René Roth Avatar answered Nov 03 '22 00:11

René Roth