I have a row of 4 div
elements aligned horizontally from left to right. Each div
takes up 25% of the screen width.
I am looking for a solution to make them wrap when the user resizes the screen instead of overlapping each other.
.MenuSett {
margin-top: 10px;
width: 100%;
position: relative;
height: 120px;
color: #0ddF00;
display: inline-block;
}
.m1 {
width: 25%;
margin: auto;
text-align: center;
float: left;
}
<div class="MenuSett">
<div class="m1">
<p>This content is valid</p>
<div ngbDropdown class="d-inline-block">
<button class="btn btn-outline-primary" id="dropdownBasic1" ngbDropdownToggle>Toggle dropdown</button>
<div ngbDropdownMenu aria-labelledby="dropdownBasic1">
<button ngbDropdownItem>Action - 1</button>
<button ngbDropdownItem>Another Action</button>
<button ngbDropdownItem>Something else is here</button>
</div>
</div>
</div>
[repeat m1 div blocks]
</div>
Following that div element, there is
.belowDiv {
position: relative;
height:350px;
}
Any suggestions on how to move it down when the above divs wrap?