You cannot remove the bottom border of Nav tabs as demonstrated on the official website

When looking at the official Angular page for navigation tabs, there is no bottom border displayed on the selected tab.

official page

However, when I implement the same code, a border is showing even on the selected nav item.

myTab example

Below is my HTML Code:

<ul class="nav nav-tabs">
    <li class="nav-item">
      <a class="nav-link active" href="#">Home</a>
    </li>
    <li class="nav-item">
      <a class="nav-link" href="#">tab 1</a>
    </li>
    <li class="nav-item">
      <a class="nav-link" href="#">tab 2</a>
    </li>
    <li class="nav-item">
      <a class="nav-link" href="#">tab 3</a>
    </li>
</ul>`

And here is my CSS:

.nav-item .active
{
background-color: rgb(119, 218, 218) !important;
border-bottom: 0px;
color:rgb(168, 19, 168);
}

Can anyone provide guidance on how to remove the bottom border from the active nav item?

Answer №1

Update: I made an error in my previous post. Here is the revised code with the appropriate css file referenced:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css">

<ul class="nav nav-tabs">
    <li class="nav-item">
        <a class="nav-link active" href="#">Active</a>
    </li>
    <li class="nav-item">
        <a class="nav-link" href="#">Link</a>
    </li>
    <li class="nav-item">
        <a class="nav-link" href="#">Link</a>
    </li>
    <li class="nav-item">
        <a class="nav-link disabled" href="#">Disabled</a>
    </li>
</ul>

It's crucial to correctly link the css file in your header for this code to function properly. Once you have done that, no additional custom css should be necessary. Additionally, ensure that any other custom css you may have doesn't conflict with this code.

Answer №2

Deleting the nav-tabs class should resolve the issue

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

Problem arises with table nth-child selector following the addition of grid-gap

Our current table looks like this: https://i.sstatic.net/eUyBB.png The first row has a background color and the second row is white - which is correct. Now I would like to align the attributes to the right. I added the following code to the table: .table ...

``Modeling CSS Classes Using the Adjacent Sibling

As a coding novice, I challenged myself to rebuild my WordPress site using HTML, CSS, and JavaScript. In my quest for the best way to create a responsive navigation bar, I stumbled upon an example on W3Schools. My dilemma lies in how to handle Adjacent Cl ...

Chrome is unable to establish a connection with the Java HTTP Server

Here is my basic HTTP Server setup: public class MyServer { public static void main(String [] args) throws IOException { Test t = null; int port = 9000; HttpServer server = HttpServer.create(new InetSocketAddress(port), 0) ...

Floating elements with varying heights cause adjacent elements to be pushed downwards

I'm dealing with 6 elements that I want to display in two rows of 3 each by floating them. However, the content of each element varies in height, causing layout issues when a taller element disrupts the float of its siblings: Check out this example C ...

Maintain font kerning for span elements that are not displayed inline

I am looking to add some transform effects to individual letters in a word. To achieve this, I have enclosed each letter within a span element. However, when setting the display of these spans to inline-block, the font kerning gets disrupted. I have exper ...

The post max size is set to 1024M, however, only half of the data posted in the $_POST array is

I am still facing an unresolved issue. I have a PHP file with HTML that contains numerous variables, including looping from a database. I have increased the post_max_size to 1024M in php.ini and confirmed it in phpinfo(). However, when I submit the form, o ...

Hide angular button when scrolling down and show it again when scrolling up

Seeking a more efficient way to display a button only on up-scroll. My current implementation involves listening for every scroll-event, which seems like it might be too computationally intensive. If anyone has a better approach, I'm open to suggestio ...

Get the value of a CSS property in Python by parsing the rendered HTML

Currently, I am using Selenium and PhantomJS in conjunction with Python for the purpose of crawling rendered web pages. While it is a straightforward process to identify the presence of specific words within the HTML content (e.g. if "example" in html...), ...

Chosen option from the Bootstrap drop-down menu

Struggling with two problematic input fields on my Bootstrap website... The first is a Bootstrap Typeahead input field: <input type="text" id="typeahead" name='name' placeholder='The name' class="form-control" data-provide="typeahe ...

What could be causing my second ajax call to render the page unresponsive?

I am encountering an issue with my AJAX call. It works fine on the first attempt, but when I try to call it a second time, the page becomes unresponsive. I am not sure what is causing this issue. The code is located within the document ready function. The ...

Owl-themed Time Picker with Switched Button Orientation

How can I reverse the positions of the cancel and set buttons in angular ng-pick-date-time? I've managed to change the labels but now I'm stuck with this. Is there a way to do it? https://i.sstatic.net/N8oE0.png ...

The variable in Vue.js is failing to update, resulting in a "variable is not defined" error

I've been attempting to display the updated value of the totalQuestions variable in the HTML, but I keep encountering the following error. Can someone point out where I went wrong? https://i.sstatic.net/mEEMS.jpg HTML <label><span class="r ...

Dropdown of ui-select in AngularJS is positioned behind a div element, causing

The ui-select-match and choices component seems to be hidden behind the div/form structure. This particular ui-select component is enclosed within several parent elements, including some divs and forms. It eventually renders as follows: > <ui-select ...

Passing parameters from an HTML form using PHP

I have a background in C# and am still relatively new to PHP. I have an HTML form that submits its values to the PHP file below, but for some reason, the values are not being set. Can you help me identify what I'm doing wrong? <?php include(' ...

How to position Bootstrap inline checkboxes to the left or right within a form well?

I am currently incorporating Twitter Bootstrap inline checkboxes into a form-horizontal well well-small setup. When I attempt to add pull-left or right to the checkboxes, they are correctly aligned but end up outside of the well element despite being nest ...

Align a header and a block of text in a vertical manner within a div

Struggling to align a h1 element and p vertically in the middle of a left-floated div, but they end up next to each other aligned vertically. Seems like table-cell display is the culprit, but not sure how to achieve vertical alignment without it. The curr ...

Remove padding in Twitter Bootstrap table cells

One of my current projects requires making a button that fills the entire width and height of the TD element. I have attempted setting the normal .btn-warning with -Xpx!important, but it did not produce the desired result. Here is what I currently have: ...

Place the button on the right side of the screen

I am struggling to move the button to the right side of the screen, similar to the icon above. I have tried using p-grid with p-align-end and vertical-container, but I haven't been successful. Can anyone provide some guidance? https://i.sstatic.net/Kk ...

Creating a navigation bar that stays fixed at the top of

Hey there, currently I am utilizing a combination of jquery and css to affix my navigation menu at the top when scrolled. However, the problem is that my navigation menu is positioned beneath a div with a height set in viewport units (vh). The jquery scr ...

Trying out basic form validation - Adjusting border color for an empty input

Currently, I am experimenting with a basic login form using PHP and testing it out on XAMPP in Chrome. Below is the code for the login form: <form action="login.php" method="POST"> <label>User: </label> <i ...