PURE CSS OFF-CANVAS MENU WITH FLEXBOX

Author:

  • Zoe Gillenwater
  • October 1, 2014

Made with:

  • HTML
  • CSS/SCSS

About the code:

This example uses flexbox to control the layout so that when the menu becomes visible, the content area can resize to fit the remaining width in the viewport, instead of overflowing the viewport and getting cut off on the right side, as happens with most off-canvas menus. The menu’s visibility is toggled without JavaScript using the checkbox hack.

Download Demo and Code

Add a Comment

Your email address will not be published.