-1

I have a table made by a set of div elements.

<div class="table-wrapper">
    <div class="table-row">
        <div class="table-cell">&nbsp;</div>
        <div class="table-cell">&nbsp;</div>
        <div class="table-cell">&nbsp;</div>
    </div>
    <div class="table-row">
        <div class="table-cell">&nbsp;</div>
        <div class="table-cell span2">&nbsp;</div>
    </div>
</div>

And here's the css

.table-wrapper { display: table; table-layout: fixed; width: 100%;}
.table-row { display: table-row; }
.table-cell { display: table-cell; width: 33%; }
.table-cell.span2 { width: 66%; }

How can I make sure the span2 div will share 2-cell width?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Chito Cheng
  • 540
  • 2
  • 9
  • 25

1 Answers1

0

It is not possible, I put the dup link in the comments.

A work around could be display: flex instead, see fiddle https://jsfiddle.net/Lddyn573/2/

.table-row { display: flex;}
.table-cell {width: 33%; }
.span2 { width: 66%;}
Adam Buchanan Smith
  • 9,422
  • 5
  • 19
  • 39