I'm using the next simple html code -
<html lang="en">
<head></head>
<body>
<a href="#" title="This is some information for our tooltip." class="tooltip">
<span>CSS3 Tooltip</span>
</a>
</body>
</html>
And I've also added some css rules to make a nice tooltip when the mouse is hovering over the link
.tooltip {
display: inline;
position: relative;
}
.tooltip:hover:after{
background: #333;
background: rgba(0,0,0,.8);
border-radius: 5px;
bottom: 26px;
color: #fff;
content: attr(title);
left: 20%;
padding: 5px 15px;
position: absolute;
z-index: 98;
width: 220px;
}
.tooltip:hover:before {
border: solid;
border-color: #333 transparent;
border-width: 6px 6px 0 6px;
bottom: 20px;
content: "";
left: 50%;
position: absolute;
z-index: 99;
}
The thing is that now I get the tooltip but also the original pop up of the title -

Is there a way to make the white tooltip gone? and only by using a css rule?
Thanks for any kind of help
Use data-* attribute instead.
.tooltip {
display: inline;
position: relative;
top: 50px;
}
.tooltip:hover:after {
background: #333;
background: rgba(0, 0, 0, .8);
border-radius: 5px;
bottom: 26px;
color: #fff;
content: attr(data-title);
left: 20%;
padding: 5px 15px;
position: absolute;
z-index: 98;
width: 220px;
}
.tooltip:hover:before {
border: solid;
border-color: #333 transparent;
border-width: 6px 6px 0 6px;
bottom: 20px;
content: "";
left: 50%;
position: absolute;
z-index: 99;
}
<a href="#" data-title="This is some information for our tooltip." class="tooltip"><span>CSS3 Tooltip</span></a>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With