I created a tooltip using Twitter Bootstrap.
The tooltip is displaying with three lines. However, I would like to display the tooltip with only one line.
How do I change the width of the tooltip? Is this specific to Twitter Bootstrap or to tooltips themselves?
in bootstrap 3.0.3 you can do it by modifying the popover class
To fix the width problem, use the following code instead.
example: http://eureka.ykyuen.info/2014/10/08/bootstrap-3-tooltip-width/
You may edit the .tooltip-inner css class in bootstrap.css. The default max-width is 200px. You may change the max-width to your desired size.
Set the class to the main tooltip div and for the inner tooltip
You should overwrite the properties using your own css. like so:
the selector choose the div that the tooltip is held (tooltip is added in by javascript and it usually does not belong to any container.
Setting the max-width of class tooltip-inner didn´t work for me, I´m using bootstrap 3.2
Some how setting max-width only work if you set the width of parent class (.tooltip).
But then all tooltips become the size you specify. So here´s my solution:
add a Width to the parent class:
Then you add the max-width and change the display to inline-block, so it will not occupy the entire space