you will have to add jquery to achieve this : DEMO
var containerW = $('.container').width();
var innerCount = $('.container .inner').length;
$('.inner').css({
width: containerW / innerCount
});
Pergunta
I have a simple question for you guys.
Check the fiddle :
<div class="container">
<div class="inner" style="background: #ff0000;"></div>
<div class="inner" style="background: #00ff00;"></div>
<div class="inner" style="background: #0000ff;"></div>
</div>
I can have an unknown number of div inside my container, i need them to fill the parent with exact same width. Without using display:table-cell;
i need it to be fully compatible with IE7...
Thanks guys !!
Solução
you will have to add jquery to achieve this : DEMO
var containerW = $('.container').width();
var innerCount = $('.container .inner').length;
$('.inner').css({
width: containerW / innerCount
});