Absolute Positionierung in der Tabelle mit Sticky-SpalteCSS

CSS verstehen
Guest
 Absolute Positionierung in der Tabelle mit Sticky-Spalte

Post by Guest »

Ich habe einen Codeausschnitt, der dem folgenden Codeabschnitt sehr ähnlich ist. Darin habe ich eine Tabelle mit einer Sticky-ersten Spalte und einem Popover in einer dieser Spalten.
Mein Problem ist, dass das Popover hinter den Sticky-Spaltenzellen versteckt ist und ich es nicht kann Finden Sie heraus, wie Sie es über ihnen platzieren können. z-index scheint nichts zu ändern. Mein gewünschtes Ergebnis ist, dass die weiße Box vollständig sichtbar ist.

Code: Select all

body {
color: white;
background: rgb(24, 119, 119);
}

.anchor {
position: relative;
}

.popover {
position: absolute;
background: white;

color: black;
padding: 5px;

z-index: 2;
}

table tr th,
table tr td {
background: blue;
}

table tr th:first-child,
table tr td:first-child {
position: sticky;
z-index: 1;
left: 0;
}

Code: Select all





Page Title







1
2


2
3
4
5


1
2
3
4
5


1
2
3
4
5


1
2
3
4
5


1
2
3
4
5



Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post