Aleš Sýkora / November 11, 2019 / 0 comments

Bootstrap 4 button line break

Post summary: Break the line of long text in Bootstrap 4 button on mobile device.

If you experience problems with showing your Bootstrap 4 buttons with long text inside on mobile devices, you need to tweak the CSS for Line Break. Bootstrap is not breaking the line automatically.

Use this CSS in your child theme style.css:

.btn {
      white-space:normal !important;
      word-wrap: break-word;
}

Fuel my passion for writing with a beer🍺

Your support not only makes me drunk but also greatly motivates me to continue creating content that helps. Cheers to more discoveries and shared success. 🍻

0 comments

Share Your Thoughts