Use the w3-card classes to display the alert as a card:
w3-card-2
w3-card-4
w3-card-8
w3-card-16
w3-card-24