Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adjust <p> width on bootstrap

Hello friends I have a problem with bootstrap and the <p> tag. When I add some big text in the <p> tag, it doesn't adjust to the 6 column that I define, it stays continuous to the right of the page taking up all space.

How could I make the text within the <p> tag always take the first 6 colums?

<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">

<div class='container'>
<div class='row'>
<div class='col-sm-6'>
    <h2 class='text'>text</h2>
    <hr>
    <h4 class='text-warning'>Title</h4>
    <p>text content</p>
</div>
like image 548
htmlpower Avatar asked Oct 26 '25 08:10

htmlpower


1 Answers

Just add this as a custom style and it'll wrap at your defined column size.

p{
    word-wrap: break-word;
}

Check it out here.

like image 81
Steven B. Avatar answered Oct 28 '25 23:10

Steven B.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!