What is the process for customizing (adjusting color and border width) on bootstrap tabs?

https://i.sstatic.net/IdhlD.png

Are you struggling with changing the color of the borders around Bootstrap tabs from light gray to dark blue? You're not alone. It can be tricky to find the right class or element to style for this specific change. Here's how you can style all tab borders:

<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<script>
   $('#myTable').on('click', '.clickable-row', function(event) {
       $(this).addClass('active').siblings().removeClass('active');
   });
</script>
</head>
<body>
<div class="container">
<ul class="nav nav-tabs">
<li class="active"><a data-toggle="tab" href="#invoice_selection">Invoice Selection</a></li>
<li><a data-toggle="tab" href="#order_summary">Order Summary</a></li>
</ul>

<div class="tab-content">
<div id="invoice_selection" class="tab-pane fade in active">
<div class="table-responsive">
<table class="table" id="myTable">
<thead>
<tr class="clickable-row">
<th>Select</th>
<th>Invoice Number</th>
<th>Due Date</th>
<th>Proce</th>
<th>Due in Days</th>
</tr>
</thead>
<tbody>
<tr class="clickable-row">
<td>
   <div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customCheck1" unchecked>
   </div>
</td>
<td>Anna</td>
<td>Pitt</td>
<td>35</td>
<td>New York</td>
</tr>
</tbody>
</table>
   </div>
</div>
<div id="order_summary" class="tab-pane fade">
<h3>Menu 1</h3>
<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
</div>
</div>
</div>

</body>
</html>

Answer №1

Modify the border color of the tabs to look like this:

.nav-tabs > li.active > a, .nav-tabs > li.active > a:focus, .nav-tabs > li.active > a:hover {
    border-left-color: darkblue;
    border-top-color: darkblue;
    border-right-color: darkblue;
}

Alternatively, you can use a more concise approach:

border: 1px solid darkblue;
border-bottom: 0;

Answer №2

.nav-tabs,
.table *,
.active a,
.table-responsive , 
 .clickable-row th {
   border-color:  #eaeaea!important;
 }

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Get tailored components from a table using Selenium in Python

Currently, I am facing an issue with my code while attempting to extract specific data from a table on a device's web server. The error seems to be related to finding a particular element in a column of the table using what appears to be an invalid ex ...

Retrieving the value of an attribute from a tag upon checking a checkbox using Jquery

When the checkboxes are selected in the HTML below, the goal is to calculate the total sum of all the listed integers. For example, if both checkboxes are checked, the sum to be calculated would be 750 + 755. <table summary='' id='table_ ...

Issues arise with element binding when incorporating AngularJS UI-Router

My website utilizes AngularJS and UI-Router. To create a separate login page that is not injected into the main view, I decided to divide the index.html file into two parts: one with layout and script includes, and another with just script includes. This w ...

Navigation Menu with Tailwind CSS Hover Effects and Spacing

I'm trying to display the sub <ul> list on the first navigation item when hovering over it: https://i.sstatic.net/KNqcx.png Everything is working fine except sometimes (it's inconsistent) when you are between the padding of the first line ...

How can I temporarily change an image when clicking on it using JavaScript?

I am working on an image section where I want to change the image for a few seconds when clicked and then revert back to the original image. Here is the code I have tried: <img src="contacticons.jpg" usemap="#image-map" id="imgName"> <a onclick ...

Validation of HTML elements with jQuery, including language support specifically for Japanese

In order to enhance the user experience of my application, I have implemented custom validation techniques and messages. Specifically, for HTML fields, I have utilized various methods. For numerical-only fields, I have assigned input tags with data-type=& ...

Can you insert a query into an HTML value?

Is it possible to include HTML code inside a table row in order to later select it? I have variables hstatus1 and hstatus2, where their meanings are htmlstatus1 and htmlstatus2. It seems to work when filling in words, but not when filling in HTML code. The ...

What is the most concise way to align one table row in the middle and another at the top?

Is there a way to align different rows in a table vertically with minimal code? I have a table with 3 rows, and I want the first two rows to be aligned vertically to the top, while the third row should be vertically aligned to the middle. If I try to def ...

Linking Two HTML Components in Angular 4 with Identical Values

Recently, I've started working with Angular and encountered an issue. In a table row, the value item.md_id is bound like this: <tr *ngFor="let item of driverData"> <td class="align-right" id="md_id" [(ngModel)]="item.md_id" name="driverId ...

Utilize the qtip function in a loop using the .each method

I'm encountering an issue with implementing the Qtip jQuery plugin across a whole class of HTML elements: $(".peoplebtn").each(function() { $(this).qtip({ content: { text: $(this).attr('qTipText') } }); }); ...

Tips for transferring information from ng-view to the navbar on the index.html page using AngularJS

Recently, I embarked on a journey to learn the MEAN stack and decided to challenge myself by building an authentication page from scratch instead of using the out-of-the-box solution. My main struggle lies in updating texts on my navbar. Here's a snip ...

Adding query parameters to links in Angular 10: A beginner's guide

I'm trying to update a link: <a class="contact-email" href="mailto:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="117268737463656364727a51666370617c7065743f727e7c">[email protected]</a>" ...

Following the path of JavaScript function calls

As I explore my Chrome console, I find myself puzzled by the mystery of the JavaScript file that gets called when I import a file from my computer after clicking on an input file tag. It seems to happen without any clear indication of which method triggere ...

Ensure the video frame stretches to fit the full width

I am struggling to make my video frame fill the entire width of the screen. Even though I have tried using CSS, the video container does not stretch to the full width as expected. https://i.sstatic.net/kxyE0.png How can I ensure that the video plays acro ...

Delay the fading in of an element using jQuery

Is there a way to remove the pause between the images in my JavaScript/jQuery slideshow when fading in and out? I attempted using a small delay, but it still didn't eliminate the blank space. Any suggestions? Check out the code on jsfiddle: https://j ...

How can we verify email addresses and URLs in PHP? Let's discuss converting this validation process

After studying the code extracted from the jquery.validate plugin, I find it quite challenging to decipher. My goal is to convert this code into PHP and I would greatly appreciate any assistance in understanding each segment of the regular expression codes ...

How can I ensure that images remain within the link elements in a flex container?

I'm currently assisting a colleague with his website. His main request is to have the two images positioned below the larger image at the beginning of the page align perfectly with the edge of the page, so that the right image lines up with the one ab ...

Having trouble getting my Node.js script to work with an AJAX XML request

I have a brief javascript script that I'm executing in node (e.g. node runScript.js). In this script, I am utilizing tiptoe, and have attempted multiple methods to fetch an xml file without any luck. tiptoe( function getESData() { var json; ...

What is the most effective way to enlarge an HTML table in the center?

Currently, I am dynamically generating an HTML table using a repeater. The table consists of four columns that I populate with company data. My goal is to enable users to click on a row and have another row appear below it, containing a Google map and addi ...

Unable to place the content within the container in Bootstrap 4

I am a newbie to Bootstrap and I've encountered an issue with content placement in a container. Even though most of the content is within the container, there seems to be a part (refer to picture container_fail) that is not enclosed properly. Please r ...