Absolute Positionierung in der Tabelle mit Sticky-Spalte

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Absolute Positionierung in der Tabelle mit Sticky-Spalte

by Guest » 19 Jan 2025, 20:03

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




Top