I'm trying to use row-gap
& column-gap
in flexbox, but it doesn't seem to be doing anything, it doesn't have any effect?
Here is a Sandbox; The padding of the flex items seem to be working, but no matter what I put into row-gap
or column-gap
, it doesn't change anything?
* {
box-sizing: border-box;
}
body {
background-color: #fff;
color: #333;
font: 1.2em / 1.5 Helvetica Neue, Helvetica, Arial, sans-serif;
}
.flex {
width: 800px;
border: 5px solid rgb(75, 70, 74);
display: flex;
flex-wrap: wrap;
row-gap: 20px;
column-gap: 20px;
}
.flex > * {
flex: 1 1 200px;
background-color: rgba(75, 70, 74, .3);
padding: 10px;
}
<div class="flex">
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
<div>Item</div>
</div>