I am currently working on a webpage layout that has the following HTML structure:
<div class="row">
<div class="col3">test 1</div>
<div class="col3">test 2</div>
<div class="col3">test 3</div>
</div>
In order to create a simple, responsive layout, I have applied the following CSS styles:
.row {
width: 100%;
display: block;
padding-left: 1.25%;
padding-right: 1.25%;
margin: 0 auto 15px auto;
}
.col3 {
width: 30%;
display: inline-block;
margin: 0 1.25%;
border: none;
}
However, I have noticed that when I shrink the page to 30% of the screen's width, the last column drops down beneath the other columns.
I'm perplexed as to why this is happening. I would expect the columns to simply become narrower and adapt to the screen size without breaking the layout. What could be causing this unexpected behavior?
Any insights or suggestions would be greatly appreciated.
Screenshots: