need to take into account header when caculating height