Some changes for calculating padding-top