I have 3 elements, I decided to make them adaptive using css grid.
<div class="elements-wrapper">
<div class="element-1"></div>
<div class="element-2"></div>
<div class="element-2"></div>
</div>
write this CSS code
.elements-wrapper{
position: relative;
clear: both;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
grid-gap: 60px;
margin-bottom: 10%;
}
everything works, but on small screens somewhere after 1200 the third element is released to the bottom and is located on the left or right edge.
| element1 | | element2 | or | element1 | | element2 |
| element3 | | element3 |
And I want that in center. Well about that kind of need.
| element1 | | element 2 |
|element 3 |