Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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