How to make a mapping: does the table-cell style work (or is the alternative similar to the alternative) if the divs with the table-row are inside the table cells? (see link)
http://jsfiddle.net/ELKQg/460/
I would like container1 div to behave like container2.
code: (if the link was to become inaccessible)
HTML:
<div id="container1" class="container"> <table> <tr> <td> <div class="row"> <div class="cell">aaaa</div> <div class="cell expand">b</div> <div class="cell">c</div> </div> </td> </tr> <tr> <td> <div class="row"> <div class="cell">d</div> <div class="cell expand">eeeee</div> <div class="cell">f</div> </div> </td> </tr> </table> </div> <div id="container2" class="container"> <div class="row"> <div class="cell">aaaa</div> <div class="cell expand">b</div> <div class="cell">c</div> </div> <div class="row"> <div class="cell">d</div> <div class="cell expand">eeeee</div> <div class="cell">f</div> </div> </div>
CSS
.container{width: 500px;overflow:hidden; } div { border:1px solid;padding: 1px;} .row {display:table-row;} .cell {display:table-cell;} .expand{overflow:hidden;width:100%;}
html css
lelmarir
source share