Automatically adjust css for cards