Click here to Skip to main content
15,887,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This my HTML:

<!DOCTYPE html>
<html>
<head>
    <meta charset=utf-8 />
    <style>
        .container {  margin-left: 15%;  width: 70%;  border: solid 1px;  border-color: blueviolet;}
        a.tooltip {  position: relative;}
        a.tooltip span em {  font-style: normal;  display: block;  border-bottom: 1px dotted #000;    }
        a.tooltip span {  white-space: nowrap;  border: 1px solid #CCC;  color: #333;  padding: 5px;  left: 50%;  top: 0;  width: auto;  position: absolute;  display: none;    }
        a.tooltip:hover span {  display: block;  } 
        a.tooltip span br {  display: none;}
    </style>
</head>

<body>
    <div class="container">
        <div>
            <a class="tooltip">Hello World - now i'm online
                <span>
                    Tooltip for Hello World1
                    line2
                    line3
                </span>
            </a>
        </div>
        <div>
            <a class="tooltip">Hello soccer World - now i'm online
                <span>
                    <img src=" http://images.all-free-download.com/images/graphicthumb/soccer_ball_clip_art_13012.jpg" alt
                        "Tooltip for Hello World2" width="50px" height="50px">
                </span>
            </a>
        </div>
        <div>
            <a class="tooltip">Hello World3 - now i'm online
                <span>
                    Tooltip for Hello World3
                </span>
            </a>
        </div>
    </div>

</body>

</html>


What I have tried:

opacity: 1.0;
filter: alpha(opacity=100);


But it does't seem to work...
Posted
Updated 22-Apr-18 1:31am

1 solution

hi, as a workaround did you try to add a background color for your span

a.tooltip:hover span { display: block; background-color:white; }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900