Calculate table height, excluding  and percentage height. Remove some unnecessary parts.