How can I detect vertical text overflow in a div element?
CSS:
div.rounded {
background-color:#FFF;
height: 123px;
width:200px;
font-size:11px;
overflow:hidden;
}
HTML:
<div id="tempDiv" class="rounded">
Lorem ipsum dolor sit amet,
consectetur adipiscing elit. Phasellus vel quam vestibulum orci blandit laoreet.
</div>
You can easily do that by comparing scrollHeight with clientHeight, try the following:
For more information please take a look at: http://help.dottoro.com/ljbixkkn.php