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
Have your used word-wrap? Try this. Hope this helps
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>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.