I am having difficulty getting correct height of elements. When I do it with jQuery:
$(this).find(".item:first").height();
I get 14, but in reality it is 18px.
I am trying to place the items inside another div and add an overflow. My thought was to get one item’s height then multiply by number of items that want to show. By getting a wrong reading I can’t seem to be able to accomplish this properly.
What am I doing wrong?
Is it possible to count the height of the group of items, say 1-5 if they all have the same class and are identical?
You (probably) are looking for
.outerHeight():The
trueaccounts for margins.