I am currently attempting to adjust the number of columns displayed on a mobile device from one column to two. Despite trying various solutions suggested by others, none of them seem to work for me. I suspect that my usage of flex may be causing the issue.
.wrapper {
display:flex;
flex-wrap: wrap;
padding:30px 20px;
margin-bottom:10px;
}
.box {
border:1px solid red;
padding:0 20px;
margin-left:10px;
}
<div class="wrapper">
<div class="box">Text 1</div>
<div class="box">Text 2</div>
<div class="box">Text 3</div>
<div class="box">Text 4</div>
<div class="box">Text 5</div>
</div>
For reference, my JSFiddle is available. The box class serves as an example to demonstrate the issue at hand. When resizing the window, all boxes end up in a single column. Can someone provide guidance on how to maintain a two-column layout?