I'd like to float a sidebar to the left and on the right float a slideshow (could be a div, li, etc.) with two columns of blog posts below it (left figure here, where the numbers represent the order the markup for the posts appears in the source). Sometimes the slideshow will not be present, and the posts need to shift up to take its place (right figure here).
I've attempted something like:
div#sidebar {
float:left;
width:240px;
}
div#right_column {
margin-left: 260px;
}
div#right_column div#slideshow {
width:640px;
height:360px;
}
div#right_column ol#posts li.post.odd {
float:left;
clear:left;
}
div#right_column ol#posts li.post.even {
margin-left:320px;
}
<div id="container">
<div id="header"></div>
<div id="sidebar"></div>
<div id="right_column">
<div id="slideshow"></div>
<ol id="posts">
<li class="post odd"></li>
<li class="post even"></li>
<li class="post odd"></li>
<li class="post even"></li>
<li class="post odd"></li>
</ol>
</div>
<div id="footer"></div>
</div>
but then the posts clear the sidebar (shifting them down below the sidebar, rather than beside it.
I also attempted to do something like:
div#sidebar {
float:left;
width:240px;
}
div#slideshow {
width:640px;
height:360px;
margin-left:260px;
}
ol#posts li.post.odd {
margin-left:260px;
}
ol#posts li.post.even {
float:right;
}
<div id="container">
<div id="header"></div>
<div id="sidebar"></div>
<div id="slideshow"></div>
<ol id="posts">
<li class="post odd"></li>
<li class="post even"></li>
<li class="post odd"></li>
<li class="post even"></li>
<li class="post odd"></li>
</ol>
<div id="footer"></div>
</div>
but then first post in the right column is pushed below the first post in the left column.
This question is very similar to what I want, but they are attempting to float three columns of variable-height posts, whereas I only need two. I think there must be a pure-CSS solution, as I'm pretty close.
I appreciate any help you can provide :).