set margin of overlay to padding of element