Consider a scenario where you have a string of characters and an HTML div element with a fixed size. How many characters from the string can fit into the div without wrapping when using a monospace font and a specified fixed font size? In addition, is there a way to adjust the font size slightly so that the text takes up the entire width of the container?
JavaScript
var s = "skjhfkjsdhjfksdhjkghskjgh...";
CSS
#c { width:267px; font-size:30px; font-family:monospace }
HTML
<div id="c"></div>
Check out this fiddle for a workaround solution that seems to work but may not be the most optimal: https://jsfiddle.net/6et20853/1/