views:

79

answers:

1
<div id="container">
  some content
</div>

Say the container div is resizable, while resizing how do I know if it's already overflowed( inner content width < container width or inner content height < container height )?

+3  A: 

As far as I know the only way is to compare the

clientHeight < scrollHeight

for vertical scrollbar

and

clientWidth < scrollWidth

for horizontal scrollbar.

rahul