.alert-msg { position: absolute; top: 2%; left: 50%; transform: translateX(-50%); }