0

I have a container DIV with random number of children inside.

I always want children to fill 100% width of parent. I tried using do display:table-cell and other CSS tricks but all in vain.

Here is fiddle.

HTML

<div class="wrapper">
    <div class="panel">1
    </div>
    <div class="panel">2
    </div>
    <div class="panel">3
    </div>
    <div class="panel">4
    </div> 
</div>
RuntimeException
  • 1,135
  • 2
  • 11
  • 25

1 Answers1

2

Add display:table to the .wrapper

http://jsfiddle.net/pA3fj/2/

Nick R
  • 7,704
  • 2
  • 22
  • 32