Trying to customize the appearance of the current tab in a nav-tabs
setup has been a bit challenging. I've created a simple file to test this functionality. When a tab is clicked, the content switches correctly, but I'm struggling to apply specific CSS styles to the active tab.
Is there an error in the file I've created? And is there a straightforward way to achieve the desired styling, such as changing the background color of the active tab, using the existing resources linked in this document? My aim is to keep the project lightweight without relying on additional JavaScript.
<div class="container">
<ul class="nav nav-tabs nav-justified">
<li class="nav-item active">
<a href="#first10" data-toggle="tab">First</a>
</li>
<li class="nav-item">
<a href="#second10" data-toggle="tab">Second</a>
</li>
</ul>
<div class="tab-content">
<div id="first10" class="tab-pane active">
<h2>First</h2>
</div>
<div id="second10" class="tab-pane">
<h2>Second</h2>
</div>
</div>
</div>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>