Escher Escher - 3 months ago 34
CSS Question

How to wrap text on bootstrap's btn-block class

What's the correct way to get bootstrap button text to wrap? I'm trying to create big buttons with fontawesome icons in them:

<div class="col-sm-4">
<a role="button" class="btn btn-block btn-color" href="#">
<div><i class="fa fa-user fa-3x"></i></div>
<div>Text that needs to wrap to next line.</div>

Here's a fiddle.


You can add white-space: normal; to the .btn class.

More information about white-space: