I am trying to create a responsive layout where some sections of an article will appear in a right hand column on larger breakpoints. The sections in each column must stack on top of each other.
The problem I am having is that box 4 is appearing opposite box 3, creating an unwanted gap under box 2 in the right hand column.
.wrapper {
width: 400px;
}
.section {
width: 50%;
}
.left {
float: left;
clear: left;
background-color: #E26A6A;
}
.right {
float: right;
clear: right;
background-color: #DCC6E0;
}
<body>
<div class="wrapper">
<div class="section left">1 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure
dolor</div>
<div class="section right">2</div>
<div class="section left">3</div>
<div class="section right">4</div>
</div>
</body>