I use Elementor in WordPress. I have 2 grid rows 2 separate div. It must be this way.
On large screens (1500) I want to have 4 columns And in smaller screens (1100) that will have 3 columns.
You can see in the following link an illustration of the problem: rows 4 and 8 are shown alone in the second row
https://jsfiddle.net/t7ku9c2q/
How can this problem be solved so that all the lines are displayed inline?
Again - it must be in 2 divs! There is no other way to do it
Code:
* {
box-sizing: border-box;
}
.wrapper {
display: flex;
flex-wrap: wrap;
}
.wrapper>* {
padding: 1em;
background-color: grey;
border: 1px solid black;
flex: 0 1 25%;
}
@media (max-width: 1200px) {
.wrapper>* {
flex: 0 1 33.33%;
}
}
<div class='wrapper'>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
</div>
<div class='wrapper'>
<div>5</div>
<div>6</div>
<div>7</div>
<div>8</div>
</div>