Escher Escher - 17 days ago 5
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>
</a>
</div>


Here's a fiddle.

Answer

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

More information about white-space: