Config distance between to cards

I think you mean this:

But I don´t know to add or modify my code.