Change your transition to:
Demo Fiddle
transition: margin-left 0.4s ease-in-out, opacity 0.6s ease-in-out;
You are currently referencing left
and not margin-left
, which is the property you are subsequently changing.
nb. You also include a transition on opacity
but haven't set any values, not sure if this is meant to be there.