Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap tooltips arrow color

I'm trying to get red tooltips of twitter-bootstrap instead of the default black, by implementing inline style of the template option of the tooltip as follows:

$(document).ready(function(){
        options = {
          container: 'body',
          placement: 'right',
          template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow" style="color: red; border-color: red;"></div><div class="tooltip-inner" style="background-color: red;"></div></div>'
        };
        $('#lnk').tooltip(options);
      });

However, according to this demo, the triangle shape of the arrow is distorted and becomes a square.

How could I, simply, solve this issue using the inline styling in the tooltip's template?

like image 547
SaidbakR Avatar asked Jul 23 '26 21:07

SaidbakR


1 Answers

Change the border-color: red; to border-right-color: red;

like image 147
Wild Beard Avatar answered Jul 26 '26 16:07

Wild Beard



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!