resize margin size based on window width