CSS Table Hack Layout
Read the article here http://grahamwalters.me/2013/09/28/css-table-column-order-reverse/
HTML
<div class="wrapper">
<div class="content">
<p>Main Content</p>
<p>Space, the final frontier. These are the voyages of the Starship Enterprise. Its five-year mission: to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no man has gone before.</p>
</div>
<div class="side">
<p>Sidebar</p>
<p>Space, the final frontier. These are the voyages of the Starship Enterprise. Its five-year mission: to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no man has gone before.</p>
</div>
</div>
<div class="footer">
<p>Footer</p>
</div>
CSS
* {
box-sizing: border-box;
-moz-box-sizing: border-box; /* Firefox */
}
.wrapper div {
padding: 10px;
}
.content {
background: #add;
}
.side {
background: #aad;
}
.footer {
width: 100%;
height: 50px;
background: #dad;
padding: 10px;
}
@media screen and (min-width: 600px) {
.wrapper {
margin: auto;
display: table;
direction: rtl;
max-width: 800px;
}
.wrapper div {
direction: ltr;
}
.content {
max-width: 600px;
background: #add;
}
.side {
display: table-cell;
width: 200px;
background: #aad;
}
.footer {
margin: auto;
max-width: 800px;
}
}