Use CSS classes instead of javascript for margin