I am looking to set up a 2x2 layout with 4 div elements. Check out my experiment in this fiddle where I utilized inline-block
for display. My goal is to position "div 3" and "div 4" directly beneath 1 and 2, respectively. Is there a way to achieve this without using floats?
Here is the HTML snippet:
<div class = "blocks">
div 1
</div>
<div class = "blocks">
div 2
</div>
<div class = "blocks">
div 3
</div>
<div class = "blocks">
div 4
</div>
And here is the associated CSS:
.blocks {
display: inline-block;
border: solid 1px red;
width: 100px;
}