CSS Display:table-cell With Div Inside Table
How to make display:table-cell style works (or look-alike alternative) if divs with style table-row are inside table cells? (see the link) http://jsfiddle.net/ELKQg/460/ I'd like t
Solution 1:
- The extra
<table>containing your<div>s in.container1needs to havewidth: 100% display: table-cellelements don't necessarily need a containingdisplay: table-rowas long as the parent isdisplay: table. Set the.rowto that (ideally you'd re-name it, seeing as the rule no longer makes sense)
Fixed and forked your demo: http://jsfiddle.net/barney/ahMg8/
Solution 2:
Use display: table for the parent table before using display:table-cell
Solution 3:
Use td's instead of divs inside tr:
<div id="container1" class="container">
<table>
<tr>
<td class="cell">aaaa</td>
<td class="cell expand">b</td>
<td class="cell">c</td>
</tr>
<tr>
<td class="cell">d</div>
<td class="cell expand">eeeee</td>
<td class="cell">f</td>
</tr>
</table>
</div>
Post a Comment for "CSS Display:table-cell With Div Inside Table"