I have been working on creating vertical tabs in Bootstrap 4 and have almost completed the task. However, I am facing an issue with making the right border of the active tab transparent. Despite several attempts, I have not been successful in achieving this effect. You can see what I have done so far in this working fiddle: https://jsfiddle.net/mgryf1v5/4/
HTML:
<div class="container">
<div id="tabs-6ea2d5d5-9e96-4da1-89be-d8faff5a653d" role="tabpanel">
<ul class="nav nav-tabs nav-tabs-left" role="tablist">
<li role="presentation" class="nav-item"><a class="nav-link" href="#tab-1" aria-controls="tab-1" role="tab" data-toggle="tab" aria-selected="false">Tab 1</a></li>
<li role="presentation" class="nav-item"><a class="nav-link" href="#tab-2" aria-controls="tab-2" role="tab" data-toggle="tab">Tab 2</a></li>
<li role="presentation" class="nav-item"><a class="nav-link" href="#tab-3" aria-controls="tab-3" role="tab" data-toggle="tab">Tab 3</a></li>
<li role="presentation" class="nav-item"><a class="nav-link" href="#tab-4" aria-controls="tab-4" role="tab" data-toggle="tab">Tab 4</a></li>
<li role="presentation" class="nav-item"><a class="nav-link" href="#tab-5" aria-controls="tab-5" role="tab" data-toggle="tab">Tab 5</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane" id="tab-1" role="tabpanel">
<div class="row">
<div class="col-12">
Content 1
</div>
</div>
</div>
<div class="tab-pane" id="tab-2" role="tabpanel">
<div class="row">
<div class="col-12">
Content 2
</div>
</div>
</div>
<div class="tab-pane" id="tab-3" role="tabpanel">
<div class="row">
<div class="col-12">
Content 3
</div>
</div>
</div>
<div class="tab-pane" id="tab-4" role="tabpanel">
<div class="row">
<div class="col-12">
Content 4
</div>
</div>
</div>
<div class="tab-pane" id="tab-5" role="tabpanel">
<div class="row">
<div class="col-12">
Content 5
</div>
</div>
</div>
</div>
</div>
</div>
CSS:
.nav-tabs-left {
float: left;
display: block;
margin-right: 20px;
border-bottom:0;
border-right: 1px solid #ddd;
}
.nav-tabs-left .nav-link.active, .nav-tabs-left .nav-item.show .nav-link {
border-color: #dee2e6 transparent #dee2e6 #dee2e6;
}
EDIT
Based on recommendations from @Rishi Raj, here is the final version of the CSS:
.nav-tabs-left {
float: left;
display: block;
margin-right: 20px;
border-bottom:0;
border-right: unset !important;
}
.nav-tabs-left .nav-link {
border-right: 1px solid #ddd !important;
}
.nav-tabs-left .nav-link.active, .nav-tabs-left .nav-item.show .nav-link {
border-color: #dee2e6 #fff #dee2e6 #dee2e6 !important;
}
For a live demonstration, you can view the updated fiddle here: https://jsfiddle.net/1rq4wv3z/