I'm using Twitter Bootstrap.
<div class="container">
<div class="row-fluid">
<h1>VeryLongWordHere</h1>
</div>
</div>
JSfiddle
On mobile screens the text becomes unreadable; leaving me with two options:
<span>
tagsHowever I'm not sure how to do either...
I use this CSS in my solution to a similar problem:
word-wrap:break-word
This will force words to break if necessary to force them to fit.
For your first option, there are a number of jQuery plugins that dynamically resize text to fit the width of the parent element. Here are a few:
You could use any of these plugins to resize the text when the screen size is smaller than a certain breakpoint. Something like this:
if (jQuery(window).width()) < 600) {
jQuery('h1').slabText();
}
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