Possible Duplicate:
How to get number of rows in <textarea >?
I have a div inside a page layout, and the user will enter text in it:
<div> user text will go here </div>
I would like to count the number of text rows the div actually occupies in the layout once the user has entered text. Notice this will vary according to the screen resolution, or the window size.
Is there a way to do so?
Even better, is there a way to get the div height in pixels?
I'm using GWT, but a JavaScript solution would do as well.
Thanks!