I have some issue with 2x2 that I tried to achive using flexbox. I'm trying to achieve something like this.
Every single grid should contain equal amount of padding. Also it's required to add borders only inside. (Within the grid, like a cross)
This is the code that I've come up with but it doesn't work properly.
HTML
<div class="info-box">
<div class="info-item grid1"></div>
<div class="info-item grid2"></div>
<div class="info-item grid3"></div>
<div class="info-item grid4"></div>
</div>
CSS
.info-box {
margin: 2rem auto 0 auto;
text-align: center;
display: flex;
flex-wrap: wrap;
flex-flow: row wrap;
flex-direction: column;
.info-item {
flex: 1 1 calc(50%);
background: $light;
&:nth-child(odd) {
flex: 0 0 50%;
}
}
}
How can I have some text inside those individual 4 grids and have some padding around it. Also I'm trying to add the border only inside. Can anyone help me?