content logo

Bootstrap Sidebars:

Bootstrap Multi-Level Sidebar

You probably have seen the slide bars on most websites. So, we are going to introduce a functional Bootstrap Sidebar Code in this post. If you have a website, it is good to use this code to gain more visitors. We have prepared the Bootstrap Multi-Level Sidebar in this post with a different theme. This code has a simple design and you can use it on your page if you have a pure website. You can use the HTML Bootstrap Sidebar to arrange the content of your page. As a result, it saves more physical space. So, you can mention more items in a smaller place.

As the following preview shows, this Pure CSS Sidebar is totally simple and you can only see a white page with a hamburger icon. As you click on this icon, four categories are presented with white color. This Multi-Level Sidebar Code has a dark theme and each category is separated with a blue line. These categories include home, about, services, and contact. You can easily move to each page that you want by clicking on the specific icon. The “Service” part includes four categories and you can select others. These sections are separated with blue lines, too.

#

Bootstrap Sidebar Code

#

HTML Bootstrap Sidebar

#

Pure CSS Sidebar

#

Multi Level Sidebar Code

<!-- This script got from frontendfreecode.com -->
<a class="toggle hc-nav-trigger hc-nav-1" href="#" role="button" aria-label="Open Menu" aria-controls="hc-nav-1" aria-expanded="false">
    <span></span>
</a>
<nav id="main-nav">
    <ul>
        <li><a href="#">Home</a></li>
        <li><a href="#">About</a></li>
        <li>
            <a href="#">Services</a>
            <ul>
                <li>
                    <a href="#">Hosting</a>
                    <ul>
                        <li><a href="#">Private Server</a></li>
                        <li><a href="#">Managed Hosting</a></li>
                    </ul>
                </li>
                <li><a href="#">Domains</a></li>
                <li><a href="#">Websites</a></li>
            </ul>
        </li>
        <li><a href="#">Contact</a></li>
    </ul>
</nav><a style="font-size: 8pt; text-decoration: none" target="_blank" href="http://frontendfreecode.com">Free Frontend</a>
                                                                            
jQuery(document).ready(function ($) {
    $("#main-nav").hcOffcanvasNav({
        // disableAt: 1024,
        customToggle: $(".toggle"),
        navTitle: "All Categories",
        levelTitles: true,
        levelTitleAsBack: true
    });
});
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css'>
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/hc-offcanvas-nav@6.1.4/dist/hc-offcanvas-nav.css'>
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/hc-offcanvas-nav@6.1.4/dist/hc-offcanvas-nav.carbon.css'>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js'></script>
<script src='https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js'></script>
<script src='https://cdn.jsdelivr.net/npm/hc-offcanvas-nav@6.1.4/dist/hc-offcanvas-nav.js'></script>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- This script got from frontendfreecode.com -->

<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css'>
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/hc-offcanvas-nav@6.1.4/dist/hc-offcanvas-nav.css'>
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/hc-offcanvas-nav@6.1.4/dist/hc-offcanvas-nav.carbon.css'>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js'></script>
<script src='https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js'></script>
<script src='https://cdn.jsdelivr.net/npm/hc-offcanvas-nav@6.1.4/dist/hc-offcanvas-nav.js'></script>
</head>
<body>
<a class="toggle hc-nav-trigger hc-nav-1" href="#" role="button" aria-label="Open Menu" aria-controls="hc-nav-1" aria-expanded="false">
    <span></span>
</a>
<nav id="main-nav">
    <ul>
        <li><a href="#">Home</a></li>
        <li><a href="#">About</a></li>
        <li>
            <a href="#">Services</a>
            <ul>
                <li>
                    <a href="#">Hosting</a>
                    <ul>
                        <li><a href="#">Private Server</a></li>
                        <li><a href="#">Managed Hosting</a></li>
                    </ul>
                </li>
                <li><a href="#">Domains</a></li>
                <li><a href="#">Websites</a></li>
            </ul>
        </li>
        <li><a href="#">Contact</a></li>
    </ul>
</nav><div id="bcl"><a style="font-size:8pt;text-decoration:none;" href="http://www.devanswer.com">Free Frontend</a></div>
<script>
jQuery(document).ready(function ($) {
    $("#main-nav").hcOffcanvasNav({
        // disableAt: 1024,
        customToggle: $(".toggle"),
        navTitle: "All Categories",
        levelTitles: true,
        levelTitleAsBack: true
    });
});
</script>

</body>
</html>
Preview