Avoid flickering of set margin on imageslider