How To Create A Collapsed Sidepanel
How To Create A Collapsed Sidepanel
w3schools.com
Hide Navbar on Scroll THE WORLD'S LARGEST WEB DEVELOPER SITE
Collapsed Sidepanel
Click on the hamburger menu/bar icon to open the sidepanel.
COLOR PICKER
Try it Yourself »
HOW TO
Step 2) Add CSS:
Example
CERTIFICATES
/* The sidepanel menu */ HTML
.sidepanel { CSS
height: 250px; /* Specify a height */ JavaScript
width: 0; /* 0 width - change this with JavaScript */ SQL
position: fixed; /* Stay in place */ Python
z-index: 1; /* Stay on top */ PHP
top: 0; jQuery
Bootstrap
left: 0;
XML
background-color: #111; /* Black*/
overflow-x: hidden; /* Disable horizontal scroll */
Read More »
padding-top: 60px; /* Place content 60px from the top */
transition: 0.5s; /* 0.5 second transition effect to slide in the sidepanel */
}
/* When you mouse over the navigation links, change their color */
.sidepanel a:hover {
color: #f1f1f1;
}
.openbtn:hover {
background-color: #444;
}
Example
Try it Yourself »
Tip: Go to our CSS Navbar Tutorial to learn more about navigation bars.
❮ Previous Next ❯
Elasticsearch Sign Up
W3Schools is optimized for learning, testing, and training. Examples might be simplified to improve reading and basic understanding. Tutorials, references, and examples are
constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use, cookie
and privacy policy. Copyright 1999-2019 by Refsnes Data. All Rights Reserved.
Powered by W3.CSS.