I have a CSS/HTML code that works perfectly in plain HTML and is also shown as an example at the end of the demo. However, it fails to work properly in SVG.
Upon inspecting the element, I found that the :after code is being called but the tooltip remains invisible. Can someone please help me diagnose where I may be going wrong?
.land
{
fill: rgba(255,210,0,0.6);
stroke:white;
stroke-opacity: 1;
stroke-width:0.5;
}
.land:hover{
fill:rgb(255,210,0);
}
.byrne {
display: inline;
position: relative;
}
.byrne: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;
}
<svg xmlns="http://www.w3.org/2000/svg" xmlns:amcharts="http://amcharts.com/ammap" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="-90 280 1040 870">
<defs>
<amcharts:ammap projection="mercator" leftlongitude="68.183544" toplatitude="37.053723" rightlongitude="97.419080" bottomlatitude="6.751085"></amcharts:ammap>
...
This might be causing issues with visibility.