2016-04-25 16 views
1

私のサイトでは、テキスト領域に空白を入れずに長い長さのテキストを挿入して表示すると、<p>または<div>というタグ内にそのテキストが表示されます。ただし、inline.howとして表示されません。間隔。HTML TextArea Break Error

これは、ビュー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

+1

使用 "単語ブレーク:ブレークのすべてを。" pタグのスタイル –

答えて

1
<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> 
+0

ありがとうございました。 – kosala

+1

ありがとうございます。 – Bhanu

2

pタグにこれを使用するためのコードである:

word-wrap:break-word; 
3

word-break: break-all;このスタイルをpタグに使用してください。

1

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

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