clamp page to valid bounds