JSFiddle - React, Tailwind, and code Playground
by nhoughto5
HTML
<table class="tg">
<tr>
<th class="tg-s6z2" title="This is a title!">Hello</th>
<th class="tg-s6z2">This</th>
</tr>
<tr>
<td class="tg-s6z2">Is</td>
<td class="tg-s6z2">a <span class="notice">!<span class="tooltiptext">Hello from the popup!</span></span></td>
</tr>
<tr>
<td class="tg-baqh">table</td>
<td class="tg-baqh">!</td>
</tr>
</table>
CSS
.tg {border-collapse:collapse;border-spacing:0;}
.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}
.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}
.tg .tg-s6z2{text-align:center}
.tg .tg-baqh{text-align:center;vertical-align:top}
.notice {
position: absolute;
top:40px;
padding: 1px 5px;
border: 2px solid white;
border-radius:100px;
/*background: -webkit-linear-gradient(top, #FF6969 0%,#ff0000 100%);*/
background: red; /* For browsers that do not support gradients */
background: -webkit-linear-gradient(top, #FF6969 0%,#ff0000 100%); /* For Safari 5.1 to 6.0 */
background: -o-linear-gradient(top, #FF6969 0%,#ff0000 100%); /* For Opera 11.1 to 12.0 */
background: -moz-linear-gradient(top, #FF6969 0%,#ff0000 100%); /* For Firefox 3.6 to 15 */
background: linear-gradient(top, #FF6969 0%,#ff0000 100%); /* Standard syntax */
box-shadow: 0 1px 2px rgba(0,0,0,.5), 0 1px 4px rgba(0,0,0,.4), 0 0 1px rgba(0,0,0,.7) inset, 0 10px 0px rgba(255,255,255,.11) inset;
-webkit-background-clip: padding-box;
font:bold 12px/11px "Helvetica Neue", sans-serif;
color: white;
text-decoration: none;
text-shadow: 0 -1px 0 rgba(0,0,0,.6);
}
.notice .tooltiptext {
visibility: hidden;
width: 350px;
white-space: nowrap;
font-family: Helvetica, sans-serif;
font-size: 10px;
top: 0px;
left: 0px;
border: 1px solid #999999;
background-color: #ffffff;
padding: 3px;
color: #000000;
/* Position the tooltip */
position: absolute;
z-index: 1;
left: -350px;
}
.notice .tooltiptext p{
margin: 10px;
text-align: left;
}
.notice:hover .tooltiptext {
visibility: visible;
}