0

The screenshot shows a tooltip with position: absolute and a very large z-index, and it works in the table itself, but as soon as I try to move it out of the table, the table container overlaps the tooltip

UPD: I know z-index works for all positions except position: static. In my case position: absolute;

.new .tooltip-container:before {
    position: absolute;
    width: 100px;
    height: 30px;
    content: "";
    top: -10px;
    background: #333333;
    z-index: 10000000000000000000000000;
}

enter image description here

  • z-index value like this, is useful, because is far away maximum value: https://stackoverflow.com/questions/491052/minimum-and-maximum-value-of-z-index – michal pavlik Nov 22 '21 at 13:11
  • Does this answer your question? [z-index not working with position absolute](https://stackoverflow.com/questions/14483589/z-index-not-working-with-position-absolute) – yassine Nov 22 '21 at 13:53
  • @yassine nope. my tooltip container already with position: absolute (not static). it means that z-index should be correct – Артём Крупский Nov 22 '21 at 14:10
  • The absolute position is related to the nearest parent who has a position different than static. – Azu Nov 22 '21 at 16:42
  • @Azu this is understandable, but how in this case can I make the tooltip higher than the parent of the parent? – Артём Крупский Nov 23 '21 at 09:53
  • You need to find a common parent of both divs and give it `position: relative`. Then you can give `position:absolute` to the two div. – Azu Nov 23 '21 at 15:55

0 Answers0