/* TOOLTIP */
[tool-info] {
position: relative;
z-index: 2;
cursor: pointer
}
[tool-info]:after,
[tool-info]:before {
visibility: hidden;
opacity: 0;
pointer-events: none
}
[tool-info]:before {
position: absolute;
top: 99%;
left: 50%;
margin-bottom: 5px;
margin-left: -37px;
padding: 7px;
width: 300px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
background-color: #000;
background-color: hsla(0, 0%, 20%, .9);
color: #fff;
content: attr(tool-info);
text-align: center;
font-size: 14px;
line-height: 1.2
}
[tool-info]:after {
position: absolute;
top: 76%;
left: 185%;
margin-left: -5px;
width: 0;
border-top: 5px solid #000;
border-top: 5px solid hsla(0, 0%, 20%, .9);
border-right: 5px solid transparent;
border-left: 5px solid transparent;
content: " ";
font-size: 0;
line-height: 0
}
[tool-info]:hover:after,
[tool-info]:hover:before {
visibility: visible;
opacity: 1
}
<a href="#" tool-info="tool-info">hover me</a>
On hover the tool tip appears but the triangle is incorrectly position how to move it upside down vertically so that the pointy side of the triangle points to the text while the other side is joined to the box to look as if its a part of the tooltip.