Skip to content

Instantly share code, notes, and snippets.

@wlcdesigns
Created October 21, 2014 20:19
Show Gist options
  • Save wlcdesigns/e4f90d35644e053197c8 to your computer and use it in GitHub Desktop.
Save wlcdesigns/e4f90d35644e053197c8 to your computer and use it in GitHub Desktop.
Foundation 5: Fixed Offcanvas Top Bar
/* Instead of fixing the top-bar only, let's fix the entire offcanvas into position and make the main-section class scrollable */
/* Add the "fixed" class to the "off-canvas-wrap" like so: */
<div class="off-canvas-wrap fixed" data-offcanvas>
/* ...and add the following to your Style Sheet: */
body,html{
height:100%;
width:100%;
}
.off-canvas-wrap,.inner-wrap{
height:100%;
}
.off-canvas-wrap .main-section
{
height: 100%; overflow:scroll;
}
/* remove scroll bars in Safari */
.off-canvas-wrap .main-section:-webkit-scrollbar {
display: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment