calculate the min height of .main