Search code examples
javascripthtmlcsstwitter-bootstraptooltip

If tooltip have long text arrow goes down (bootstrap)


I have default bootstrap tooltip with custom styles for arrows that have only font color and size, nothing special with paddings or margin.

If I have short text - it's ok: short text

If it's a littile longer - arrow goes down through the tooltip: longer one

another common problem - if tooltip position is near the end of the page/window: enter image description here

There are the same styles for each tooltip.

I've tried to fix it by different ways based on answers from stackoverflow, but it wasn't helpful. Please, help me to understand this strange behaviour. What style should I use for arrows to make it fixed at the border of tooltip?

PS: another detail - if I will swap "hide people" and "show feedback" tooltips - it becomes ok. So, probably it depends on tooltip position too.


Solution

  • Thanks to @Youness,

    max-width exactly for main .tooltip class is helpful.