Reputation: 149
I am fiddling around with Bootstrap, and everything is going quite well. But when I make a div to put text in, the text sticks outside the div, making the page as wide as the string. Isn't bootstrap responsible for taking care of this?
Here is the relevant HTML code:
<div class="row top-buffer">
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4 col cell">
<div class="col-xs-12 col-md-12 col-sm-12 col-lg12 inner">
<p>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p>
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-4 col cell">
<div class="col-xs-12 col-md-12 col-sm-12 col-lg12 inner">
<p>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</p>
</div>
</div>
</div>
Upvotes: 2
Views: 18605
Reputation: 586
Add a custom width to your div, then either add a scrollbar or hide the text (text-overflow:ellipsis
).
Upvotes: 0
Reputation: 3575
If you want the browser to automatically break your text you should add the css word-wrap: break-word;
property. To your surrounding tag (in this case the <p>
tag).
Upvotes: 3
Reputation: 6711
The browser doesn't do automatic hyphenation. Put some whitespaces in your text and it should work as expected.
Upvotes: 6