I have 4 elements to be displayed on a mobile screen. I want to have them display in 2 columns of 2 elements each on portrait view and a single row for all 4 of them on landscape view.
Portrait view:
Plan 1 Plan 2
Plan 3 Plan 4
Landscape view:
Plan 1 Plan 2 Plan 3 Plan 4
This is my html code:
<div class="flex">
<label>Plan 1</label>
<label>Plan 2</label>
<label>Plan 3</label>
<label>Plan 4</label>
</div>
my css:
.flex {
display:flex;
flex-direction:column;
}
I can pull out only 1 column. What should I do?