I\'m a beginner in Javascript, and trying to make a simple script that pushes a box using the mouse pointer. But unfortunately it isn\'t working for some reason, i hope you guys
You need to set a CSS position property other than static to the element so CSS left property can work.
position
static
left
.css-box{ position: absolute; width : 100px; height : 100px; margin : auto; background-color : blue; }