Reputation: 11
I am wrapping the text in 2 lines . On Google Chrome it's wrapping in 2 lines using the code overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; max-width: 100%; white-space: normal;
But this code is not working on Internet Explore and Firefox.
Please help me
Upvotes: 1
Views: 1904
Reputation: 8409
can you copy paste this code to your html page ,this one worked for me , text will wrap all broswers
.main_box {
float:left;
height: 200px;
width: 200px;
position:relative;
}
.main_box p {
word-wrap: break-word;
}
<div class="main_box">
<p>jasdlfjlasjdfsajdfjsadfjlsajdflsjdfjsldfjlsjdflsjdfljsadlfjsldjflsajdflasjdfjsaldj</p>
</div>
Upvotes: 0