INTRODUCTION
NO BLOAT SIDEBARS
Welcome to a tutorial on how to create a simple CSS sidebar. There are literally tons of sidebar plugins that you can use in your project on the Internet these days, but they don’t really show you the mechanics behind… and some of them even use 3rd party frameworks that add to the loading bloat. So in this guide, we will walk through various pure CSS ways to create a sidebar, so you can decide which is the best for your own project – Read on!
I have included a zip file with all the source code at the end of this tutorial, so you don’t have to copy-paste everything… Or if you just want to dive straight in.
CONFESSION
AN HONEST DISCLOSURE
Quick, hide your wallets! I am an affiliate partner of Google, eBay, Adobe, Bluehost, Clickbank, and more. There are affiliate links and advertisements throughout this website. Whenever you buy things from the evil links that I recommend, I will make a commission. Nah. These are just things to keep the blog going, and allows me to give more good stuff to you guys - for free. So thank you if you decide to pick up my recommendations!
NAVIGATION
TABLE OF CONTENTS
Method 1 | Method 2 | Method 3 |
Method 4 | Extra | Closing |
METHOD 1
FLOATING DIV
Let us start with one of the most traditional ways to create a sidebar, by putting two containers side-by-side using float.
THE HTML
CSS Sidebar Demo
PAGE HEADER
Main Contents area.
Yep, it is a game of