The tooltip is obscured by the table row

I'm having trouble with a simple CSS fix and can't seem to figure out why. The z-index and overflow visibility properties are not working as expected. I just need 'In Progress' to be displayed above everything else.

Some things I've already tried:

  • Setting z-index: 999
  • Applying overflow: visible
  • Adding z-index to all table, tbody, th, td elements with a value of 0

https://i.stack.imgur.com/SdMl9.png

HTML

.custom-tooltip {
  .tooltip-inner {
    background: $Alabaster-gray;
    width: max-content;
    color: $cape-cod-gray;
    font-size: 1rem;
  }
  .arrow::before {
    border-top-color: $Alabaster-gray;
  }
  &.left {
    .tooltip-inner {
      text-align: left;
      white-space: pre-wrap;
    }
  }

  z-index: 9999;
  overflow: visible;
  position: relative;
}

table thead tr tbody td div {
  z-index: auto;
  position: relative;
  overflow: visible;
}

.status {
  height: 18px;
  width: 18px;
  border-radius: 20px;
  background-position: center;
  margin-top: 2px;
  &.yellow {
    background-image: url('../../../assets/icons/active.svg');
  }
}
<div>
  <table>
    <thead>
      <th>Name</th>
    </thead>
  </table>
  <tbody>
    <tr *ngFor="let job of jobs">
      <td>
        <div>
          <div ngbTooltip="'In Progress'" tooltipClass="custom-tooltip">
              <div class="status mx-4" [ngClass]="'yellow'"></div>
          </div>
        </div>
      </td>
    </tr>
  </tbody>
</div>

Answer №1

The crucial element that was omitted was the container property:

<div ngbTooltip="Test" container="body"></div>

Explore more about positioning here

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

Guide to selecting an element with a combination of text and a random number using Selenium with JavaScript

<a id="Message4217" class="btn-sm btn-danger Message" data-id="4217"><span class="icon-adjustment icon-trash"></span> Delete</a> The objective is to remove a message base ...

Angular2 material select component is malfunctioning

Currently incorporating Google material 2 into my Angular 2 project and utilizing either Reactive Form or Data Driven form. states = [ { value: 'KA', viewValue: 'Karnataka' }, { value: 'GJ', viewValue: 'Gujarat&a ...

Internet Explorer's support for the `<summary>` tag in HTML

Is there a method to enable the summary tag in Internet Explorer 11, such as using an external library? <details> <summary>Here is the summary.</summary> <p>Lorem ipsum dolor sit amet</p> </details> App ...

Tips for designing a horizontal sub-navigation menu using CSS?

I have limited experience with list menus and am struggling to create a horizontal submenu with its own styling. Despite multiple attempts, I have been unsuccessful in finding a solution and have put the project on hold for now. Here is what I currently h ...

Hide the border on a table with CSS

I recently installed a Wordpress Template and customized the table's background and text colors. However, I am struggling to remove the border around the table. Despite searching for solutions, my limited CSS knowledge has not led me to a fix that wor ...

Issue with Angular 17 button click functionality not functioning as expected

Having trouble with a button that should trigger the function fun(). Here's the code snippet I'm using. In my TS file: fun(): void { this.test = 'You are my hero!'; alert('hello') } Here is the respective HTML: &l ...

Adjust the width of the <li> element based on the quantity of its children

If the number of list items can be changed dynamically, how can I adjust the width of each item so that the total width is always 100%? Here is an example code snippet: <nav> <ul> <li>A</li> <li>B</li> &l ...

Modifying the color scheme of the table background and text

After finding a code example online to assist with creating a table in my project, I am faced with the challenge of changing the background color of the white rows to match the dark blue used for others. Additionally, I cannot figure out how to change the ...

The HTML file that was downloaded appears to contain jumbled and nonsensical text

I recently downloaded some HTML files from an Android application. They display perfectly when opened within the app, but appear jumbled on my computer. There is also a CSS file included. If necessary, I can provide the CSS file for reference. While I am n ...

Create a dynamic webpage where two div elements glide in opposite directions

My apologies for this seemingly basic question, but I am wondering if anyone knows how to create an animation where a div moves up and down while scrolling, similar to the effect on this website: On that site, near the footer, there are 2 sections with 2 ...

The bold horizontal line in HTML tables is a bit unusual and is caused by the border-collapse property

Edit 1: The strange issue appears to be related to the border-collapse property in CSS, as it can be resolved by using border-spacing: 0px. However, the question remains, why does border-collapse result in this behavior? It seems to be connected to scaling ...

Guide to populating a list in a resolver during navigation and storing the initial item in the ngrx store

I recently incorporated ngrx into my application to manage the data centrally. However, I am facing challenges with loading the initial data and navigating to a default value. This has raised questions regarding the best approach to utilizing ngrx while re ...

JSON Novice - persistently storing data in JSON during browser refreshes

My AJAX poll was set up following a guide found here: http://www.w3schools.com/php/php_ajax_poll.asp Instead of storing the poll entries from an HTML radio button in an array within a text file as demonstrated in the tutorial, I wanted to save them in a J ...

Tips for preventing the use of website URLs as variables in jQuery ajax() calls:

Having some trouble. For example: $(document).ready(function () { $("#btnSend").click(function () { var noti_p = { url: "Pusher_Controller.ashx", data: "&appname=" + $("#selt1").val() + "&title=" + $("#title"). ...

Looking for some help with tweaking this script - it's so close to working perfectly! The images are supposed to show up while

Hey everyone, I'm struggling with a script issue! I currently have a gallery of images where the opacity is set to 0 in my CSS. I want these images to become visible when scrolling down (on view). In this script, I have specified that they should app ...

Utilize Pseudo Elements for Designing a Unique Background Overlay

I am aiming to create a div with a customizable background, and then utilize a pseudo element to generate a semi-transparent white overlay that will lighten the background of the div. The crucial requirement is for the "overlay" to appear beneath the conte ...

Automatically transitioning from a chatbot interface to an Ionic mobile app page as the conversation progresses

My current setup involves incorporating the MS chatbot-framework V3 into my ionic 3 mobile app using Direct line. The goal is to gracefully end the conversation with the chatbot and seamlessly transition to another page within the mobile app, while also p ...

Is it possible to alter the color of an SVG icon when it is used in conjunction with <mat-icon> in Angular Material?

Trying to change the color of an svg icon displayed using Angular Material on hover has been a challenge for me. Here's my code snippet: <mat-icon svgIcon="menu"></mat-icon> The icon is visible, but when I attempt to add a class for chan ...

Using Javascript, you can create a function that can disable or enable a text link based on

Here is the code snippet showcasing CSS styles and HTML elements: CSS: .enableLink{ font-family:Verdana, Geneva, sans-serif; font-size:12px; color:#069; padding-right:20px; text-decoration:underline; cursor:pointer; } .disableLink{ display:none; fon ...

Retrieving fresh data from Firestore with Angular Firebase persistence

My angular 8 app with firestore, built using angularfirebase, is designed to work offline by enabling persistence on firebase. However, I am facing an issue where the local data doesn't update when changes are made in firestore itself or on another de ...