Fixed parts of the problems

You had changed the type to uppercase which my function could not
handle. Altered function to handle this. However, the text alignment of
the cards is still wrong and I don't see what is causing it since the
css still says "center".