Ok this is giving me quite an headache...
this is my code/example
https://codepen.io/anon/pen/xXpjYa
.flex {
display: flex;
flex-wrap: wrap;
}
.imageContainer {
flex: 1 0 30%;
height: 200px;
border: 5px solid black;
background-color: deeppink;
margin:15px;
}
.imageContainer:empty {
height: 0;
border: none;
};
<div class="flex">
<div class="imageContainer">a</div>
<div class="imageContainer">a</div>
<div class="imageContainer">a</div>
<div class="imageContainer">a</div>
<div class="imageContainer"></div>
<div class="imageContainer"></div>
</div>
the problem is that I want to achieve/fix two things:
- the far left and far right column should be touching the edge of the viewport
- the fixed gap should be 30px and only the pink boxes stretch responsively
- notice the last item (5) is slightly wider than the others...why??
please help! thanks!