I’m building a little sticky notes app for fun, and sometimes this happens:

(It’s because the first word is wider than the width of the note.)
Is there a way to check whether the scrollbar is present with Javascript? If I can do that, I can resize the note until it contains the text without the scrollbar.
This CSS3 property will break a word within if it is too large for its container:
word-wrap: normal;to toggle styleThis works in basically every browser and believe it or not, support for the property goes as far back as IE5. Credit for this goes to Louis Lazaris for his post, Word-Wrap: A CSS3 Property That Works in Every Browser.