alright, this is the css code : .main { width: 100px; height: 100px; border-radius: 60px; background-color: green; margin: 10px; display: inline-flex; } .first { position: absolute; }
and this is the html :
`
I don’t know what you mean. You have three divs, and the one with the class .first is moving on keydown.
You mentioned other jQuery code in your OP though. Maybe there’s something wrong.
Edit: Since that div.first is absolutely positioned, it will initially be at the same position as the second, statically positioned div. Maybe that’s creating the impression of being a copy.