I have this codepen here, shouldn't the text goes to new line when it reaches the right border of div?
html:
<div class="test">
<p>dfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodjdfsjiodj</p>
</div>
css:
div.test{
width:400px;
height:800px;
border-style: solid;
border-color: red;
margin:1px; padding:1px;
}
Use word-wrap:break-word
div.test{
width:400px;
height:800px;
border-style: solid;
border-color: red;
margin:1px; padding:1px;
word-wrap:break-word;
}
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