Bootstrap incorporates white-space: nowrap
into its style sheets.
If you want word wrap functionality, you will need to modify it to something like normal
in your CSS.
For more information about the white-space property, visit: https://developer.mozilla.org/en-US/docs/Web/CSS/white-space
Below is a simple code snippet inspired by examples from the Bootstrap website.
.dropdown-menu {
width: 150px;
}
.wordwrap {
white-space: normal !important;
}
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<div class="container">
<div class="row">
<div class="col">
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Dropdown button
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#">Text without any custom styling</a>
<a class="dropdown-item wordwrap" href="#">Text with white-space set to normal</a>
</div>
</div>
</div>
</div>
</div>