I need a help i have a diamond grid, but it not responsive. my task is a making it grid on flexbox! on the mobile resolutions (340px), it will be two on the row. I have already tried everything and do not know how more make it:( i edited this code - box-sizing: border-box
i send screenshot with an example how should it beenter image description here
* {
box-sizing: border-box
}
.container {
width: 940px;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-align: end;
-webkit-align-items: flex-end;
-ms-flex-align: end;
align-items: flex-end;
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.container .item {
margin-top: 110px;
-webkit-flex-basis: 240px;
-ms-flex-preferred-size: 240px;
flex-basis: 240px;
height: 240px;
-webkit-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
transform: rotate(-45deg);
background-color: #e2e4e7;
border: 15px solid #f6f8fb;
outline: 1px solid #e2e4e7;
overflow: hidden;
-webkit-transition: all .3s ease;
-o-transition: all .3s ease;
transition: all .3s ease;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-align: end;
-webkit-align-items: flex-end;
-ms-flex-align: end;
align-items: flex-end;
-webkit-box-flex: 50vh;
-webkit-flex-grow: 50vh;
-ms-flex-positive: 50vh;
flex-grow: 50vh;
}
.container .item:hover {
background-color: #3e9eff;
-webkit-transition: all .3s ease;
-o-transition: all .3s ease;
transition: all .3s ease;
}
.container .item:nth-child(n+4) {
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
-webkit-justify-content: space-around;
-ms-flex-pack: distribute;
justify-content: space-around;
margin-top: -65px;
}
.container .item:nth-child(4) {
margin-left: 175px;
}
.container .item:nth-child(5) {
margin-right: 175px;
}
.sectionTwo .container .item:last-child {
margin: 0 auto;
margin-top: -65px;
}
<div class="container">
<a href="#" class="item"></a>
<a href="#" class="item"></a>
<a href="#" class="item"></a>
<a href="#" class="item"></a>
<a href="#" class="item"></a>
<a href="#" class="item"></a>
</div>