0

I want to add a tooltip with Bootstrap's popover like this:

<ul>
     <li>Entry 1 ....................................................................</li>
     <li>Entry 2 ....................................................................</li>
     <li>Entry 3 ....................................................................</li>
</ul>

However, Bootstrap will break the line automatically at some point. I have set html: true and tried to add a div element:

<div style="word-break: keep-all>
<ul>
     <li style="word-break: keep-all"></li>
</ul>
</div>

but it still breaks the line. Is it possible to avoid automatically line breaks and maybe add a horizontal scrollbar instead? How can I even specify the width of the tooltip area?

Baradé
  • 1,290
  • 1
  • 15
  • 35

2 Answers2

0

You can try

<ul>
   <li style="white-space: nowrap"></li> 
</ul>

white-space: nowrap will force the content to be all in one line.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Carol B.
  • 21
  • 5
0

You'd need to add an overflow-x: scroll; to your .popover-content class, as well as a white-space: nowrap to each li.

https://jsfiddle.net/nrpe1m05/

Alexandre Elshobokshy
  • 10,720
  • 6
  • 27
  • 57