html - Position absolute table inside div in Internet Explorer -


i have table position absolute inside div , want table stay text inside div. firefox correct, chrome needed display:-webkit-box; make work.

but question is, how fix internet explorer? (ie 9 , up)

.container {     width:250px;     height:250px;     background:red;     position:relative;   }  .container table {     position:absolute;     top:20px; left:100px;     display:-moz-box;     display:-webkit-box;     display:-ms-flex;     display:box;   }
<div class="container">    <table cellpadding="0" cellspacing="0">      <tr>        <td>lorem ipsum dolor sit amet, consectetuer adipiscing elit. aenean commodo ligula eget dolor. aenean massa. cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</td>      </tr>    </table>  </div>

fiddle example: http://jsfiddle.net/wllgp/

note: simplified version of code, can't change table in div know solves problem.

edit: using responsive design outer div (.container) can have width.

remove display properties, , give <table> the width needs:

container width : 250px - left 100px : 150px;

.container table {     left: 100px;     position: absolute;     top: 20px;     width: 150px; } 

here demo


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -