The persistent underline on the tooltip just won't go away

Hey there, this is my first time posting a question here so I hope I got everything right!

I'm currently in the process of creating a form for a WordPress site using Bootstrap. I need to incorporate tooltips with Font Awesome icons, but for some reason, I can't seem to remove the underline from the tooltip.

Check out this image of the tooltip with the underline

Here's a snippet of the code:

<label for="name"><a data-toggle="tooltip" data-placement="bottom" title="Placeholder"><i class='far fa-question-circle'></i></a>Name:</label>

And here are some CSS snippets:

label a i {
  color: blue !important;
}

a:hover, a:visited, a:link, a:active
{
    text-decoration: none !important;
}

Additionally, here's the JavaScript used:

// Document loaded function
jQuery(document).ready(function(){
  jQuery('[data-toggle="tooltip"]').tooltip();
  jQuery('.fa-question-circle').hover(function() {
    jQuery(this).removeClass( 'far' ).addClass( 'fas' );
  }, function() {
    jQuery(this).removeClass( 'fas' ).addClass( 'far' );
  });
});

I've tried various solutions to no avail. Any help would be much appreciated!

Update: Turns out there was a border-bottom: 1px; being added by the blank theme I'm using (I'm working on a plugin). Even though border:0!important; didn't work, adding

border-bottom: 0px solid !important;
solved the issue.

Answer №1

After some investigation, I discovered that the blank theme I am using for my plugin was unexpectedly adding a border-bottom: 1px;. Despite trying border:0!important;, it didn't resolve the issue. However, when I added

border-bottom: 0px solid !important;
, the problem was finally fixed.

Answer №2

In my opinion, the text underline is specifically targeted at the a elements, therefore by using this CSS snippet you can effectively get rid of it:

label a {
   text-decoration: none !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

What causes a neighboring div to change width when a multi-line span is present?

Here is my React code: <InfoWrapper> <InfoCircle> <span>i</span> </InfoCircle> <span className="info-label"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. elit. </span> </InfoWrap ...

Anchor validation across various spans

Here is the HTML code snippet I am working with: <p class="main-text"> <span>Lorem Ipsum</span> <span>Lorem Ipsum</span> <span>Lorem Ipsum</span> <span>Lorem Ipsum</span> ...

Adding additional elements to a div in a horizontal orientation

I am currently working on a project where I need to display bars and restaurants based on specific filter criteria. I have a container div called .resultsContainer where all the results will be displayed. While I can easily append more divs (.barContainer) ...

The chaotic world of Android WebKit versions 2.x and 3.x

I have been working on an Android app and my goal is to make it compatible with Android versions 2.2 and above. Currently, due to issues with the WebView control, I am restricted to targeting Android 4.0 and higher. The app primarily uses HTML, CSS, Java ...

Why are my cursor and my drawing line on opposite sides?

I've been working on a JavaScript drawing app, but I'm facing an issue where the drawn elements are not aligned with my cursor. The positioning seems off, especially when moving to the right or up on the canvas. As I move towards the furthest lef ...

Sorting rows by words and numbers in JavaScript explained

Hello, I'm a beginner and I need help sorting the table rows in the following table. I also want to attach an onclick listener to the header after it is displayed. ID Name Inventory Volume 1 Rachel Data is not enough 2 Ross 100 3 Monica 1 ...

JavaScript animation is not functioning as expected

I created a div with the id of "cen" and gave it a height and width of 50px. $(document).ready(function() { $("#cen").animate({ height: 500px, width: "500px", }, 5000, function() { // Animation complete. }); }); Unfort ...

How to use jQuery to set a background image using CSS

I've been working on setting backgrounds dynamically with a jQuery script, but it seems like the .css function is not working as expected. Here's the code snippet: $(document).ready(function () { $(".VociMenuSportG").each(function () { ...

The malfunction of CSS3 effect

I designed a website and used DIV CSS to call an image. .header_bottom_area { background: url(../img/HomepagePanels.jpg)no-repeat scroll center center; max-width: 100%; width: auto; height: 911px; } I would like to have the same image as shown in ...

Is there a way to implement a scrollbar that only scrolls through one specific column in an HTML table?

I need help adding a scrollbar to a specific column in an HTML table. Take a look at this scenario https://jsfiddle.net/6wpdc4tL/: https://i.stack.imgur.com/svzIg.png This table should have two scrollbars, one for the light blue SCROLL column and another ...

Struggling with aligning two divs side by side on an HTML page

Recently, I've been experimenting with Electron and attempting to create 2 divs side by side. Despite trying various alignment options found here, nothing seems to be working for me. Here's the code I have so far: Code body, html { hei ...

Puzzled by the CSS Box Model - There's a piece of the puzzle I

Check out my simplified fluid layout right here at this link. I've been trying to figure out why the alignment between the right column and the header above it seems off, even though there's no padding involved. Both have the same border styles, ...

"Uncovering the ways iOS disrupts background-size functionality

I am currently working on creating several marked images that will adjust in size to fit the length of their content. This functionality works well on most browsers, except for those on iOS devices like iPhone and iPad. Take a look at the image-link below ...

Error in Firefox: "Anticipated media feature name, but discovered 'hover'"

I am trying to style elements differently based on whether the client browser supports hovering or not. I came across media features as a solution and implemented it in the following way: /* Supports hovering */ @media (hover: hover) { ... } /* Does not ...

Revamping Footer Text

Hey there, I'm feeling a bit inexperienced with this question, so after struggling on my own for a while I decided to turn to stackoverflow for help. So, I have a website located at , and at the very bottom of the page there's some copyright inf ...

Arrange a pair of div containers side by side on the webpage without the need to alter the existing

Is there a way to align these two div side by side? <div class="main_one"> <div class="number_one">Title A</div> </div> <div class="main_two"> <div class="number_two">Title B</div> </div> <div class=" ...

Is there a way to apply CSS styles to a specific word within a div that corresponds to the word entered in the search box?

Using a searchbox, you can enter words to find pages with the searched-for word in the page description. If the word is found in the description, a link to the page along with the highlighted word will be displayed. However, I am encountering an issue wher ...

Experiencing inconsistencies with CSS on certain devices?

When faced with a research issue, I usually turn to Google for answers. However, this time, I was unsure of where to begin. As part of my efforts to enhance my frontend development skills, I undertook The Odin Project and worked on a calculator project. U ...

Tips for successfully transferring an image through an XMLHttpRequest

I found this helpful resource at: I decided to test out the second block of code. When I made changes in the handleForm function, it looked like this: function handleForm(e) { e.preventDefault(); var data = new FormData(); f ...

Unable to remove certain links from the navigation menu in WooCommerce's "My Account" section

I am currently working on a project that involves using both SenseiLMS and Woocommerce. I am facing an issue with some automatically added navigation elements that I cannot seem to remove. Here is how it looks The specific English text that I am unable to ...