I have a page full of blocks which pile up with display: inline-block
. I want to make some four or two times bigger, so I used float: left
or right
to put other blocks around.
My problem is if I have a five-element row, how could I put a bigger element in the middle of it? (as float
put it naturally on the side).
Here's an example snippet:
#wrapper{
width: 516px;
}
.block{
display: inline-block;
width: 90px;
height: 50px;
margin: 5px;
background-color: red;
}
.bigger{
height: 110px;
}
<div id="wrapper">
<div class="block"></div>
<div class="block"></div>
<div class="block"></div>
<div class="block"></div>
<div class="block"></div>
<div class="block"></div>
<div class="block bigger"></div>
<div class="block"></div>
<div class="block"></div>
</div>