consider outerMargin when resizing