css height incorrect

css height incorrect

First time using this forum...

I have an app written in jQuery that reads the css height of a div box with variable amounts of text in it.
The css height is set to auto and most of the time the css height read by jQuery is correct.

However I have found a problem when the text on the last line results in no spaces at the end of the line.
eg it fits exactly within the width of the div box.
When this happens the css height is what would be expected if the number of lines of text was one extra than actually displayed.
This is a problem because I am using the height to calculate the height of another div box below it.


eg. say two lines of text returns a height of 38
If I have a single line that fits the div width exactly, then it will also return 38 instead of a lower figure you would expect for a single line.

Any ideas??
Is this jQuery or a general CSS problem.
Any solutions??

The code looks like this:
parseInt($(this).find('.titletext').css('height'), 10)