educative.io

Image carousel exercise - moving button

Hi, I have just successfully passed image carousel exercise but I noticed that both prev and next buttons are on the right side of the picture. With use of JS I tried to move the prev button on the left side like in the example at the very beginning of the exercise but I failed. Below my code:
prev.setAttribute(“margin-left”, 30px);
If this change is possible but my code is wrong please let me know and I will try on but if this IDE is build in such a way that changing such attribute in CSS is not possible please let me know too so I will not waste my time on attempts :slight_smile:
Waiting for feedback, Camil

Hi @Camil,

You can use prev.style.left = "30px" ; to move the button left.