content logo

Bootstrap Sidebars:

Bootstrap Expanding Sidebar

Many web designers focus too much on other aspects of the site and therefore, the visual aspect of your web pages and how they basically look gets neglected. A beautiful environment or a professional one, depending on the usage of your content, can help attract more visitors which will then become users if you manage to catch their interest. One of the best methods to achieve this, is by adding a properly designed Bootstrap sidebar. Sidebars are great features that will give many benefits to your website.

With that said, the main problem that lies with this method is the physical space that sidebars usually take up. You don’t want an extra feature covering up your main stuff. Because of this, an option known as an expanding sidebar is available. The one we have for you in this post features a solid blue background with only the icons visible at first but when you hover your mouse’s cursor on one of the icons, the full item will be displayed. This is a neat icon sidebar designed with mainly the websites with les space in mind. You can scroll down and use the code for this beautiful and effective blue sidebar without having to pay for any web designers.

#

Bootstrap Sidebar

#

Expanding Sidebar

#

Icon Sidebar

#

Blue Sidebar

<!-- This script got from frontendfreecode.com -->
<div class="left">
    <div class="item">
        <i class="fas fa-fw fa-bars"></i>
    </div>
    <div class="item active">
        <i class="fas fa-fw fa-map-marked-alt"></i> Map
    </div>
    <div class="item">
        <i class="fas fa-fw fa-columns"></i> Split
    </div>
    <div class="item">
        <i class="fas fa-fw fa-th"></i> Grid
    </div>
    <div class="item">
        <i class="fas fa-fw fa-user-circle"></i> Dash
    </div>
</div><a style="font-size: 8pt; text-decoration: none" target="_blank" href="http://frontendfreecode.com">Free Frontend</a>
                                                                            
.left,
.right {
    top: 50%;
    float: left;
}
.left {
    background: #337ab7;
    display: inline-block;
    white-space: nowrap;
    width: 50px;
    transition: width .5s;
}
.right {
    background: #fff;
    width: 350px;
    transition: width 1s;
    border-style: solid;
    border-color: #ccc;
    border-width: 1px;
}
.left:hover {
    width: 250px;
}
.item:hover {
    background-color: #222;
}
.left .fas {
    margin: 15px;
    width: 20px;
    color: #fff;
}
i.fas {
    font-size: 17px;
    vertical-align: middle !important;
}
.item {
    height: 50px;
    overflow: hidden;
    color: #fff;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css" >
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" >
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" ></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" ></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/js/bootstrap.min.js" ></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/js/bootstrap.min.js" ></script>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- This script got from frontendfreecode.com -->

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css" >
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" >
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" ></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" ></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/js/bootstrap.min.js" ></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/js/bootstrap.min.js" ></script>
<style>
.left,
.right {
    top: 50%;
    float: left;
}
.left {
    background: #337ab7;
    display: inline-block;
    white-space: nowrap;
    width: 50px;
    transition: width .5s;
}
.right {
    background: #fff;
    width: 350px;
    transition: width 1s;
    border-style: solid;
    border-color: #ccc;
    border-width: 1px;
}
.left:hover {
    width: 250px;
}
.item:hover {
    background-color: #222;
}
.left .fas {
    margin: 15px;
    width: 20px;
    color: #fff;
}
i.fas {
    font-size: 17px;
    vertical-align: middle !important;
}
.item {
    height: 50px;
    overflow: hidden;
    color: #fff;
}
</style>

</head>
<body>
<div class="left">
    <div class="item">
        <i class="fas fa-fw fa-bars"></i>
    </div>
    <div class="item active">
        <i class="fas fa-fw fa-map-marked-alt"></i> Map
    </div>
    <div class="item">
        <i class="fas fa-fw fa-columns"></i> Split
    </div>
    <div class="item">
        <i class="fas fa-fw fa-th"></i> Grid
    </div>
    <div class="item">
        <i class="fas fa-fw fa-user-circle"></i> Dash
    </div>
</div><div id="bcl"><a style="font-size:8pt;text-decoration:none;" href="http://www.devanswer.com">Free Frontend</a></div>

</body>
</html>
Preview