4

I am using this link. http://lodev09.github.io/bootstrap-suggest/

On this page, when you start typing with @ characters in the first textbox, system shows a dropdown with certain values. I want to ensure, after every 20 characters system should wrap the text in the next line.

I tried adding following style to <li> tag but it did not helped.

word-wrap:break-word;
max-width:30px;
isherwood
  • 58,414
  • 16
  • 114
  • 157
OpenStack
  • 5,048
  • 9
  • 34
  • 69

2 Answers2

8

I would use something like:

li { 
     word-wrap: break-word; 
     max-width: 20ch;
}

It doesn't break the word at 20 characters but rather wraps the text when it hits the 20 character limit.

Anonymous User
  • 494
  • 4
  • 12
Neil Clayton
  • 146
  • 7
1

adding this class helped:

.dropdown.suggest>.dropdown-menu>li>a {
    white-space: normal;
}
OpenStack
  • 5,048
  • 9
  • 34
  • 69