changes px to percent in margins