kosala kosala - 7 months ago 20
Javascript Question

HTML TextArea Break Error

In my site im inserting long length text without space in text area and view then view that text inside

<p>
or
<div>
tag.but text dosn't break it shows as inline.how can i view text with proper spacing.

This is code for view textarea



.text_in_status p {
color: #333;
font-size: 1.1em;
font-weight: 400;
display: block;


}

<div className="text_in_status clearfix">
<p >{this.props.post.text}</p>
</div>





enter image description here

Answer
<style>
.text_in_status p {
  color: #333;
  font-size: 1.1em;
  font-weight: 400;
    display: block;
    word-wrap:break-word;

}
</style>
<div className="text_in_status clearfix">
                <p >{this.props.post.text}</p>
              </div>