I've encountered an issue where tooltips on adjacent elements are being obscured by headers of subsequent elements. I've attempted adjusting the z-index, but it hasn't resolved the problem - the root cause eludes me.
.header {
vertical-align: bottom;
}
.rotated-header .tooltip-text {
visibility: hidden;
background-color: #555;
color: #fff;
text-align: center;
border-radius: 6px;
position: absolute;
z-index: 10;
opacity: 0;
transform:rotate(45deg);
transform-origin: left;
width:25em;
white-space: normal;
}
.rotated-header .tooltip-text::after {
content: "";
position: absolute;
border-style: solid;
z-index: 11;
}
.rotated-header:hover .tooltip-text {
visibility: visible;
position: absolute;
opacity: 1;
z-index: 10;
}
.schedule-header-tooltip {
white-space: nowrap;
pointer-events: auto;
position: absolute;
bottom: 0;
z-index: 1;
}
.rotated-header {
width:30px;
height:100px;
position:relative;
transform:
translate(1em, -1em)
rotate(315deg);
transform-origin:bottom;
pointer-events: none;
}
.tableFixHead {
overflow: auto;
height: 150px;
}
.tableFixHead thead tr {
position: sticky;
top: -2em;
background: white;
}
<div class="tableFixHead">
<table>
<thead>
<tr>
<th class="header">Asset</th>
<th class="header">
<div class="rotated-header">
<div class="schedule-header-tooltip">
<span>Rotated row 1</span>
</div>
<div class="tooltip-text">
<span>Name</span>Something extremely long and unwieldy
<span>Date</span>
<span>Age</span>
</div>
</div>
</th>
<th class="header">
<div class="rotated-header">
<div class="schedule-header-tooltip">
<span>Rotated row 1</span>
</div>
<div class="tooltip-text">
<span>Name:</span> Something extremely long and unwieldy
<span>Date</span>
<span>Age</span>
</div>
</div>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>some</td>
<td>some</td>
<td>some</td>
</tr>
<tr>
<td>some</td>
<td>some</td>
<td>some</td>
</tr>
<tr>
<td>some</td>
<td>some</td>
<td>some</td>
</tr>
<tr>
<td>some</td>
<td>some</td>
<td>some</td>
</tr>
<tr>
<td>some</td>
<td>some</td>
<td>some</td>
</tr>
<tr>
<td>some</td>
<td>some</td>
<td>some</td>
</tr>
</tbody>
</table>
</div>
Perhaps there's a more effective way to implement these tooltips...