javascript - Hiding partly overflowing text in a multi-line div? -


how remove or hide partly overflowing text row? example:

html:

<div>lot of interesting text in multi-line box how remove or hide last line</div> 

css:

div {     border: 1px solid black;     height:65px;     width:150px;     overflow:hidden; } 

https://jsfiddle.net/7mudnnco/

edit: image of how want result:

image of how want result

edit2: similar question has working solution looking solution lines hidden when no line visible. working solution: http://jsfiddle.net/4fpq2/9/ (change height 15px see why not working)

if font size , box size known can design box contains 3 lines of text, 1 way be:

div {     border: 1px solid black;     height:65px;     width:150px;     overflow:hidden;     line-height: 22px;    } 

Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -