Tooltip with CSS prevent the original title to be displayed
Posted: 29 Dec 2014, 14:45
Hello
I'm using this simple html code:
And I've added some css rules to make a nice tooltip when the mouse is hovering over the link.
I get the tooltip made with CSS, but also the original pop up of the title.
Is there a way to make the browser's default tooltip gone? And only by using a css rule?
Thanks for any kind of help..
I'm using this simple html code:
Code: Select all
<html lang="en">
<head></head>
<body>
<a href="#" title="This is some info for tooltip" class="tooltip">
<span>CSS3 Tooltip</span>
</a>
</body>
</html>
Code: Select all
.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;
}
Is there a way to make the browser's default tooltip gone? And only by using a css rule?
Thanks for any kind of help..