html - Truncating Text to 3 Lines in IE -
i have simple span tag content spans multiple lines, , have figured out how cap off @ 3 lines, , follow ellipsis (...)
the problem is, doesn't work in ie11, , to. here's code:
html:
<span class="itemlabel"> line 1<br/> line 2<br/> line 3<br/> line 4<br/> line 5<br/> </span>
css:
.itemlabel{ overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; font-size: 11px; }
now content of span being populated dynamically, have 0 control of amount of text put span, , have set width of 180px on anchor tag surround span , product image, unable "don't use many break tags", i'm putting them there example though there 5 lines present, css cut span off @ 3 maximum.
how can achieve same display in ie?
since there no cross browser solution, needed kind of way limit textual output in user friendly design. end [database] exports 3 (3) distinct possible pieces of information, title, author, price (the problem title and/or author run on multiple lines).
the solution got break these 3 pieces of information 3 separate spans, , apply cross-browser solution of word-wrap/ellipsis each line. presented client, explained limitations , fine solution.
it seems, more , more ie/edge becoming less , less reliable when comes newer advancements in ui/ux , responsive design. our last check 3% of our customers still using ie/edge browser of choice.
Comments
Post a Comment