Ronald
Ronald

Reputation: 557

CSS - table data not going under fixed table header

In the Table Fixed Header, I need the all text to go under the fixed header. This works for everything except the (Img) text in the first column. The Img goes over the fixed header. I believe it is probably in the CSS where I need to make the adjustment but cannot figure out how to adjust visibility....

The Img text produces a image toolip when you hover over it.

JSFIDDLE https://jsfiddle.net/rbla/1Ljuycbe/27/

/* IMAGE TOOLTIP */
.up:hover {
    cursor:pointer;
}

.tooltip2 {
    position: relative;
    display: inline-block;
    border-bottom: 3px dotted black; /* If you want dots under the hoverable text */
    text-decoration: none; 
    color: #00F;
}

img.cadre {
    border: 3px solid #D2D1D1; 
    border-radius: 4px; 
    width: 125px;
    height: 125px;
}

/* Tooltip text */
.tooltip2 .tooltiptext2 { 
    visibility: hidden;
    width: 130px;
    background-color: #fff;
    color: #fff;
    text-align: center;
    padding: 5px 5px;
    border-radius: 6px;
    margin-left: 7px;


    /* Position the tooltip text - see examples below! */
    position: absolute;
    z-index: 0;
}

/* Show the tooltip text when you mouse over the tooltip container */
.tooltip2:hover .tooltiptext2 {
    visibility: visible;
    cursor:pointer;
}

/* Positioning - Right Tooltip */
.tooltip2 .tooltiptext2 { 
    top: -5px;
    left: 105%; 
}

/* Left Arrow */
.tooltip2 .tooltiptext2::after {
    content: " ";
    position: absolute;
    top: 15px;
    right: 100%; /* To the left of the tooltip */
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent white transparent transparent;
}

Upvotes: 1

Views: 84

Answers (1)

Bahman Parsa Manesh
Bahman Parsa Manesh

Reputation: 2370

You need to add z-index for the fixed table head. z-index property controls the vertical stacking order of elements that overlap.

Add this class to your CSS:

table.blue.fixed {
    z-index: 99;
}

jsFiddle

Upvotes: 2

Related Questions