I have a div
with a fixed size of 100px. scrollWidth
and scrollHeight
works fine if the text in the div
is normal (no word is long enough to fill the one row entirely). However, if there is any text with one word rendering wider than the 100px it will cause a problem.
Let's say the text is like "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890": then Firefox returns the wrong scrollWidth
(100 in this case, which is same as the actual width even though the div
is overflowing). However, IE is giving the correct scrollWidth
(180 in this case).
Please help me get the correct scrollWidth
in Firefox. Sorry if my question looks vague.