I have three divs with the following properties:
div.main-box {
width: 100px;
height: 100px;
display: inline-block;
padding: 20px;
margin: 20px;
border: 1px solid black;
}
They are side-by-side on the page:
__ __ __
|__||__||__|
I remove two of them at a time based on a user interaction (e.g., the user clicks the third, and the first two disappear). After they are removed, the remaining box moves to the center.
As it is now, the box simply appears in the center. I would like to animate this movement.
Here is a jsFiddle for what I have now:
Is what I am asking possible? Thanks for your help!
Update:
What I'm asking doesn't seem to be possible. Can I hold the remaining box in place after the other boxes are removed and then animate it's movement?