What is the best solution for a responsive sidebar? I have a header area, a content area, a footer area and a sidebar area. For smaller screens I want the sidebar to drop off from the right side and end up underneath the content area and above the footer. How do I do this?
..................................................................................
. . .
. Header . .
..................................................................... .
. . .
. . .
. . .
. . Sidebar .
. . .
. Content . .
. . .
. . .
..................................................................................
. .
. Footer .
.................................................................................. .
Here you have a quick example code I created. http://jsfiddle.net/jtorrescr/CNf8Q/ as mentioned by Kade Keithy, you need to play with your @media to determine in what screen resolution you want to change your layout. So just reset what you are using to create your aside in the @media.
HTML
CSS
For this you can use media queries. They allow you to conditionally apply css based on screen size.
Here is an example:
So what you would likely do is change the float of the sidebar based on screen size.
I recommend this guide for more info: http://blog.teamtreehouse.com/beginners-guide-to-responsive-web-design