Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bootstrap tooltip auto placement in div with overflow-y

I have twitter-bootstrap tooltips on links within a div. The div has its overflow-y set to auto. My issue is that placement: 'auto top' is not respected relative to the div's top. If I scroll down the page (to put the div toward the top of the browser) the auto placement works. So in short I'm wondering if its possible to get the tooltip to react to the div top not the page top.

Here is how I am initiating it...

$("#"+caller).tooltip({html:true,title:resultString,placement:'auto top'});
like image 648
nrd Avatar asked Oct 29 '25 12:10

nrd


1 Answers

Ok so no need to re-invent a thing :) just add a fixed position to the tooltip class...

.tooltip{
        position:fixed;
}
like image 68
nrd Avatar answered Oct 31 '25 11:10

nrd



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!