Reputation: 5910
I have a flex layout in follwing fiddle: http://jsfiddle.net/TfB9c/14/
HTML:
<div class="flex-frame">
<div class="tile">
<div class="inner-tile ">TEST TEST TEST TEST TEST TEST TEST</div>
</div>
<div class="tile">
<div class="inner-tile ">TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST</div>
</div>
<div class="tile">
<div class="inner-tile ">TEST TEST TEST TEST TEST TEST TEST</div>
</div>
<div class="tile">
<div class="inner-tile ">TEST TEST TEST TEST TEST TEST TEST</div>
</div>
<div class="tile">
<div class="inner-tile ">TEST TEST TEST TEST TEST TEST TEST</div>
</div>
</div>
CSS:
.flex-frame {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-ms-flex-wrap: wrap;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
}
.tile {
width: 25%;
background-color: #15b575;
margin: -1px;
border: 1px inset white;
}
.inner-tile {
height: 100%;
background-color: yellow;
}
In Firefox, i get the expected result, in one row, each tiles height is equal:
In Chrome this is not the case. What is the error, I can't figure it out?
Upvotes: 1
Views: 2099
Reputation: 16979
You just need to make some modifications and specify display: flex
on the parent .tile
and flex: 1
to child .inner-tile
Upvotes: 3