Basic Sidebar Navigation With Pure CSS

Author: devsloveit
Views Total: 3,481 views
Official Page: Go to website
Last Update: December 21, 2016
License: MIT


Basic Sidebar Navigation With Pure CSS


Just another CSS solution to create a sidebar off-canvas navigation using plain HTML and CSS transitions and transforms.

How to use it:

Download the zip and import the style sheet off-canvas.css in the header of the html page.

<link rel="stylesheet" href="off-canvas.css">

The primary HTML structure for the sidebar nav and trigger element.

<div class="d-off-canvas-wrapper d-example">
  <input type="checkbox" id="d-off-canvas-trigger">
  <label for="d-off-canvas-trigger" class="d-off-canvas-trigger">
  <label for="d-off-canvas-trigger" class="d-off-canvas-helper"></label>
  <div class="d-off-canvas" data-comes-from="right">
      Here goes your content.

Style the sidebar navigation in the CSS.

.d-example .d-off-canvas {
  max-width: 320px;
  background-color: red;

Style the background overlay when the sidebar navigation is active.

.d-off-canvas-helper {
  background-color: black;

See also  Responsive Step Progress Indicator with Pure CSS

Leave a Reply

Your email address will not be published. Required fields are marked *