Click here to Skip to main content
15,905,915 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I have tried with the below code but i am not able to display popup at right side of the textbox.
could you please help me on that.

What I have tried:

HTML
<!DOCTYPE html>


.tooltip {
    position: relative;
    display: inline-block;
    
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 10%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}



<h2>Tooltip</h2>
<p>Move the mouse over the text below:</p>

<div class="tooltip">
  
  <table class="tooltiptext"><tbody><tr><td>sasas</td></tr></tbody></table>
</div>
Posted
Updated 29-Mar-18 1:02am
v2

1 solution

HTML
<html><head></head><body style="text-align:center;"><!DOCTYPE html>

<style>
.tooltip {
    position: relative;
    display: inline-block;
    
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 220px;
    height:200px;
    background-color: #ccc;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    top: -5px;
    left: 105%;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 6%;
    right: 100%;
    margin-top: -5px;
    border-width: 7px;
    border-style: solid;
    border-color: transparent #ccc transparent transparent;
}
.tooltip:hover .tooltiptext {
    visibility: visible;
}
</style>


<h2>Right Tooltip w/ Left Arrow</h2>

<div class="tooltip"><input type="text"> <table class="tooltiptext"><tbody><tr><td></td></tr><tr></tr></tbody></table>
  
</div>
<input type="text">


</body></html>
 
Share this answer
 
v2
Comments
Richard MacCutchan 29-Mar-18 7:00am    
We will now assume that posting this means you have fixed your problem.

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