Calculating heights on detail view