Correct styling for hidden elements during animation