Method to change the background of the selected card