This is possible by using float
and the margin
properties.
I simply floated your two divs
to either side, and of course clear:both
in the middle to stop them overlapping. Once done, I used margin-top
with both positive and negative values to position the divs
as if the first is below the second, when in fact the first is above the second in the code.
CSS
.content {
width: 400px;
margin: 0 auto;
}
.first-block {
background: coral;
margin-top:300px;
float:left;
}
.second-block {
background: #DEDEDE;
margin-top:-300px;
float:right;
}
HTML
<div class="content">
<div class="first-block">
Mauris at tortor vel nulla rutrum porta. Etiam non condimentum velit. Phasellus turpis magna, sagittis at porta et, tincidunt id magna. Maecenas hendrerit suscipit massa, at consectetur magna tempor et. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. In hac habitasse platea dictumst. Etiam accumsan.
</div>
<div style="clear:both;"></div>
<div class="second-block">
Suspendisse suscipit tortor eu nulla interdum sit amet ultricies ante imperdiet. Donec varius adipiscing lectus in suscipit. Nunc risus arcu, luctus nec tempor porttitor, sodales eget lectus. Vestibulum imperdiet massa in ligula pellentesque eget egestas dui facilisis. Nunc commodo lacus at nibh tristique sodales
</div>
</div>
Heres a fiddle demo for you!