I recently implemented Bootstrap 4.6 into my project.
The page I am working on includes both vertical pills and horizontal tabs. While the vertical pills are displaying correctly, I have encountered an issue with the styling of the horizontal tabs when they are selected.
Below is a snippet of my HTML code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- Bootstrap and jQuery CDNs -->
<style type="text/css">
/* Custom CSS goes here */
</style>
<title></title>
</head>
<body>
<div class="profile-posts tab">
<div class="row">
<div class="col-3">
<div class="nav flex-column nav-pills" id="v-pills-tab" role="tablist"
aria-orientation="vertical">
<a class="nav-link active" id="v-pills-home-tab" data-toggle="pill" href=
"#v-pills-home" role="tab" aria-controls="v-pills-home" aria-selected="true"
name="v-pills-home-tab">Foo</a>
<a class="nav-link" id="v-pills-profile-tab"
data-toggle="pill" href="#v-pills-profile" role="tab" aria-controls=
"v-pills-profile" aria-selected="false" name="v-pills-profile-tab">Bar</a>
<a class="nav-link" id="v-pills-messages-tab" data-toggle="pill" href=
"#v-pills-messages" role="tab" aria-controls="v-pills-messages" aria-selected=
"false" name="v-pills-messages-tab">FooBar</a>
<a class="nav-link" id=
"v-pills-settings-tab" data-toggle="pill" href="#v-pills-settings" role="tab"
aria-controls="v-pills-settings" aria-selected="false" name=
"v-pills-settings-tab">FoofooBar</a>
</div>
</div>
<!-- Horizontal tabs content -->
<div class="col-9">
<div class="tab-content" id="v-pills-tabContent">
<div class="tab-pane fade show active" id="v-pills-home" role="tabpanel"
aria-labelledby="v-pills-home-tab">
<ul class="nav nav-tabs">
<li class="active"><a href="#first" data-toggle="tab">Menu 1</a></li>
<li><a href="#second" data-toggle="tab">Menu 2</a></li>
<li><a href="#third" data-toggle="tab">Menu 3</a></li>
</ul>
<div class="tab-content">
<div id="first" class="tab-pane active">
Menu 1 items
</div>
<div id="second" class="tab-pane">
Menu 2 items
</div>
<div id="third" class="tab-pane">
Menu 3 items
</div>
</div>
</div>
<!-- Remaining tabs go here -->
</div>
</div>
</div>
</div>
</body>
</html>
I am currently seeking guidance on how to address the styling issue where the selected tab is not highlighted properly. Additionally, there seems to be some spacing concerns between the tabs that may require adjustment in the CSS.