content logo

Bootstrap Tabs:

Bootstrap Centered Tabs with Icons

Appearance has an important impact on any website that attracts many visitors and audiences. So, you have to consider a beautiful design for your website to be successful in this specific field. We have provided the Bootstrap Centered Tabs with Icons with the best structure and function in this post. Using these Centered CSS Tabs allows you to organize your website and sort the information into different sections. These sections are editable, and you can rename them easily. Many people will come to your website and not be confused by using these Simple Bootstrap Tabs.

As you can see in the preview that we have prepared below, this bootstrap is simple with a white background. There is a line under each part, and as you select a specific section, that will turn to blue. As you can see in these Simple Centered Tabs, three icons beside each division make it more attractive. As soon as you click on a specific section, you can see a hover effect that shows the line. This helps people to distinguish the selected part. The sections of the Bootstrap Tabs with Icons are black, and the detailed text is gray.

#

Centered CSS Tabs

#

Bootstrap Tabs with Icons

#

Simple Bootstrap Tabs

#

Simple Centered Tabs

<!-- This script got from frontendfreecode.com -->
<div class="container">
    <div class="row">
        <div class="col-md-offset-3 col-md-6">
            <div class="tab" role="tabpanel">
                <!-- Nav tabs -->
                <ul class="nav nav-tabs" role="tablist">
                    <li role="presentation" class="active"><a href="#Section1" aria-controls="home" role="tab" data-toggle="tab"><i class="fa fa-globe"></i> Section 1</a></li>
                    <li role="presentation"><a href="#Section2" aria-controls="profile" role="tab" data-toggle="tab"><i class="fa fa-rocket"></i> Section 2</a></li>
                    <li role="presentation"><a href="#Section3" aria-controls="messages" role="tab" data-toggle="tab"><i class="fa fa-briefcase"></i> Section 3</a></li>
                </ul>
                <!-- Tab panes -->
                <div class="tab-content tabs">
                    <div role="tabpanel" class="tab-pane fade in active" id="Section1">
                        <h3>Section 1</h3>
                        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras nec urna aliquam, ornare eros vel, malesuada lorem. Nullam faucibus lorem at eros consectetur lobortis. Maecenas nec nibh congue, placerat sem id, rutrum velit. Phasellus porta enim at facilisis condimentum. Maecenas pharetra dolor vel elit tempor pellentesque sed sed eros. Aenean vitae mauris tincidunt, imperdiet orci semper, rhoncus ligula. Vivamus scelerisque.</p>
                    </div>
                    <div role="tabpanel" class="tab-pane fade" id="Section2">
                        <h3>Section 2</h3>
                        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras nec urna aliquam, ornare eros vel, malesuada lorem. Nullam faucibus lorem at eros consectetur lobortis. Maecenas nec nibh congue, placerat sem id, rutrum velit. Phasellus porta enim at facilisis condimentum. Maecenas pharetra dolor vel elit tempor pellentesque sed sed eros. Aenean vitae mauris tincidunt, imperdiet orci semper, rhoncus ligula. Vivamus scelerisque.</p>
                    </div>
                    <div role="tabpanel" class="tab-pane fade" id="Section3">
                        <h3>Section 3</h3>
                        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras nec urna aliquam, ornare eros vel, malesuada lorem. Nullam faucibus lorem at eros consectetur lobortis. Maecenas nec nibh congue, placerat sem id, rutrum velit. Phasellus porta enim at facilisis condimentum. Maecenas pharetra dolor vel elit tempor pellentesque sed sed eros. Aenean vitae mauris tincidunt, imperdiet orci semper, rhoncus ligula. Vivamus scelerisque.</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div><a style="font-size: 8pt; text-decoration: none" target="_blank" href="http://frontendfreecode.com">Free Frontend</a>
                                                                            
body {
    margin: 20px;
}
a:hover,
a:focus {
    outline: none;
    text-decoration: none;
}
.tab {
    text-align: center;
}
.tab .nav-tabs {
    display: inline-block;
    border-bottom: none;
    position: relative;
}
.tab .nav-tabs li {
    margin-bottom: 0;
}
.tab .nav-tabs li a {
    display: block;
    padding: 20px;
    border: none;
    border-radius: 0;
    font-size: 17px;
    font-weight: 700;
    color: #444;
    margin-right: 0;
    text-align: center;
    z-index: 1;
    transition: all 0.3s ease 0s;
}
.tab .nav-tabs li a i {
    display: block;
    font-size: 40px;
    color: #00a6ff;
    margin-bottom: 15px;
}
.tab .nav-tabs li.active a,
.tab .nav-tabs li a:hover {
    border: none;
    background: transparent;
}
.tab .nav-tabs li a:before,
.tab .nav-tabs li a:after {
    content: "";
    width: 0;
    border-top: 3px solid #00a6ff;
    position: absolute;
    bottom: -1px;
    left: 0;
    transition: all 0.3s ease 0s;
}
.tab .nav-tabs li a:after {
    left: auto;
    right: 0;
}
.tab .nav-tabs li.active a:before,
.tab .nav-tabs li a:hover:before,
.tab .nav-tabs li.active a:after,
.tab .nav-tabs li a:hover:after {
    width: 50%;
}
.tab .tab-content {
    padding: 20px;
    margin-top: -5px;
    border-radius: 0 0 5px 5px;
    border-top: 1px solid #d7d6d6;
    font-size: 15px;
    color: #757575;
    line-height: 30px;
}
.tab .tab-content h3 {
    font-size: 24px;
    margin-top: 0;
}
@media only screen and (max-width: 479px) {
    .tab .nav-tabs li {
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }
    .tab .nav-tabs li a,
    .tab .nav-tabs li a:hover {
        border-bottom: 1px solid #dfdfdf;
    }
    .tab .tab-content {
        border-top: none;
    }
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- This script got from frontendfreecode.com -->

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<style>
body {
    margin: 20px;
}
a:hover,
a:focus {
    outline: none;
    text-decoration: none;
}
.tab {
    text-align: center;
}
.tab .nav-tabs {
    display: inline-block;
    border-bottom: none;
    position: relative;
}
.tab .nav-tabs li {
    margin-bottom: 0;
}
.tab .nav-tabs li a {
    display: block;
    padding: 20px;
    border: none;
    border-radius: 0;
    font-size: 17px;
    font-weight: 700;
    color: #444;
    margin-right: 0;
    text-align: center;
    z-index: 1;
    transition: all 0.3s ease 0s;
}
.tab .nav-tabs li a i {
    display: block;
    font-size: 40px;
    color: #00a6ff;
    margin-bottom: 15px;
}
.tab .nav-tabs li.active a,
.tab .nav-tabs li a:hover {
    border: none;
    background: transparent;
}
.tab .nav-tabs li a:before,
.tab .nav-tabs li a:after {
    content: "";
    width: 0;
    border-top: 3px solid #00a6ff;
    position: absolute;
    bottom: -1px;
    left: 0;
    transition: all 0.3s ease 0s;
}
.tab .nav-tabs li a:after {
    left: auto;
    right: 0;
}
.tab .nav-tabs li.active a:before,
.tab .nav-tabs li a:hover:before,
.tab .nav-tabs li.active a:after,
.tab .nav-tabs li a:hover:after {
    width: 50%;
}
.tab .tab-content {
    padding: 20px;
    margin-top: -5px;
    border-radius: 0 0 5px 5px;
    border-top: 1px solid #d7d6d6;
    font-size: 15px;
    color: #757575;
    line-height: 30px;
}
.tab .tab-content h3 {
    font-size: 24px;
    margin-top: 0;
}
@media only screen and (max-width: 479px) {
    .tab .nav-tabs li {
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }
    .tab .nav-tabs li a,
    .tab .nav-tabs li a:hover {
        border-bottom: 1px solid #dfdfdf;
    }
    .tab .tab-content {
        border-top: none;
    }
}
</style>

</head>
<body>
<div class="container">
    <div class="row">
        <div class="col-md-offset-3 col-md-6">
            <div class="tab" role="tabpanel">
                <!-- Nav tabs -->
                <ul class="nav nav-tabs" role="tablist">
                    <li role="presentation" class="active"><a href="#Section1" aria-controls="home" role="tab" data-toggle="tab"><i class="fa fa-globe"></i> Section 1</a></li>
                    <li role="presentation"><a href="#Section2" aria-controls="profile" role="tab" data-toggle="tab"><i class="fa fa-rocket"></i> Section 2</a></li>
                    <li role="presentation"><a href="#Section3" aria-controls="messages" role="tab" data-toggle="tab"><i class="fa fa-briefcase"></i> Section 3</a></li>
                </ul>
                <!-- Tab panes -->
                <div class="tab-content tabs">
                    <div role="tabpanel" class="tab-pane fade in active" id="Section1">
                        <h3>Section 1</h3>
                        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras nec urna aliquam, ornare eros vel, malesuada lorem. Nullam faucibus lorem at eros consectetur lobortis. Maecenas nec nibh congue, placerat sem id, rutrum velit. Phasellus porta enim at facilisis condimentum. Maecenas pharetra dolor vel elit tempor pellentesque sed sed eros. Aenean vitae mauris tincidunt, imperdiet orci semper, rhoncus ligula. Vivamus scelerisque.</p>
                    </div>
                    <div role="tabpanel" class="tab-pane fade" id="Section2">
                        <h3>Section 2</h3>
                        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras nec urna aliquam, ornare eros vel, malesuada lorem. Nullam faucibus lorem at eros consectetur lobortis. Maecenas nec nibh congue, placerat sem id, rutrum velit. Phasellus porta enim at facilisis condimentum. Maecenas pharetra dolor vel elit tempor pellentesque sed sed eros. Aenean vitae mauris tincidunt, imperdiet orci semper, rhoncus ligula. Vivamus scelerisque.</p>
                    </div>
                    <div role="tabpanel" class="tab-pane fade" id="Section3">
                        <h3>Section 3</h3>
                        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras nec urna aliquam, ornare eros vel, malesuada lorem. Nullam faucibus lorem at eros consectetur lobortis. Maecenas nec nibh congue, placerat sem id, rutrum velit. Phasellus porta enim at facilisis condimentum. Maecenas pharetra dolor vel elit tempor pellentesque sed sed eros. Aenean vitae mauris tincidunt, imperdiet orci semper, rhoncus ligula. Vivamus scelerisque.</p>
                    </div>
                </div>
            </div>
        </div>
    </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