I need to determine if the width of the text inside the div will exceed the width of the div.
JSFiddle link: https://jsfiddle.net/92800cst/
HTML:
<html>
<body>
<div id="breaking" >
<label class="brNews">1318 Test - iPhone Start Page</label>
<span>
<div id="brContent">Test Content Title Which Exceeds the outer element width to scroll</div>
</span>
</div>
</body>
</html>
I want to scroll the content (using the selection) inside the brContent div if the content exceeds the div, otherwise I want to display the content as is.
I do not want to calculate based on the length of the characters of the text, since we use it on multiple devices.
source
share