- calculating top and bottom relative to document