I have tried with plugin its woking fine.
i need without plugin add some tooltip with css.
<div class="tooltip-text">Parent text
<span class="tooltiptext">Tooltip text here!</span>
</div>
styles:
.tooltip-box {
position: relative;
display: inline-block;
}
.tooltip-box .tooltip-text {
visibility: hidden;
width: 100px;
background-color: black;
color: #fff;
text-align: center;
padding: 6px 0;
position: absolute;
z-index: 1;
}
.tooltip-box:hover .tooltip-text {
visibility: visible;
}
if using some text contents it works fine.
now i m using buttons here
<div class="kt-btn-wrap kt-btn-wrap-2">
<a class="kt-button button kt-btn-2-action kt-btn-size-custom kt-btn-style-basic kt-
btn-svg-show-always kt-btn-has-text-true kt-btn-has-svg-false" >
<span class="kt-btn-inner-text">Tooltip Button</span>
</a></div></div>
if i use span class also didnt work. usual button style also changed. better solution suggest me Thank you
2
Answers
check this for button and text
Your actual code should work (granted you’re fixing class names – your example code has some "deviations" …).
Example 1
So most likely there are some typos in your html or css.
The main concept is perfectly OK:
position:relative
position: absolute
and hidden visibility that’s toggled on hoverExample 2: inlined tooltips
Should work for any parent element. But you might have more specific css rules inherited by your theme or plugins (… uhm, wordpress). So you will need to inspect your computed styles in dev tools if you encounter any issues.