finally fix the problem of expanding the div height to the maximum