Take in account the padding of containing element when height = auto

Uses parent.parent.height, instead of parent.parent.innerHeight to take
in acount the padding of the containing element whent the height is set
to 'auto'