I applied word-wrap: break-word
to twitter bootstrap dropdown-nemu, but it didn't work. Here's the JSFiddle.
I tried a simplified sample and it worked:
<ul style="width: 60px">
<li>
<a style="word-wrap: break-word">fdsssssssssssssssssssssssssdfdsfsdfsdf</a>
</li>
</ul>
Solution : The dropdown should be toggled via data attributes or using javascript. In the above program, we have forgotten to add a data attribute so the dropdown is not working. So add data-bs-toggle="dropdown" to toggle the dropdown.
Unfortunately, there is no 'word-wrap' feature on Comboboxes or Dropdowns. All you can do is try to make the ComboBox wider or the text smaller.
To open the dropdown menu, use a button or a link with a class of . dropdown-toggle and the data-toggle="dropdown" attribute. The . caret class creates a caret arrow icon (), which indicates that the button is a dropdown.
It was because of white-space: nowrap
property with link.. add this line:
<li><a href="#" style="word-wrap: break-word; white-space: normal;">sometextsometextsometextsometextsometext</a></li>
..or use full fiddle here: http://jsfiddle.net/Ex5fA/45/ (you had also typos with your .dropdown-menu
selector.. it was typed .dorpdown-nenu
;)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With