aligning toast messages in css

I wanna align the toast messages to the bottom left corner and when there's more than one message, I wanna move them upward with a gap of about 10px from each individual message so that all of them are readable and is in the same bottom-left position but currently when I change the position to anything else other than "fixed" it goes on top and the width doesn't rely on the padding anymore and "fixed" makes a message appear on top of another. thnx for any help!

.success{
    display: block;
    position: fixed;
    bottom: 0;
    margin-bottom: 10px;
    margin-left: 4%;
    font-family: Arial;
    padding: 15px;
    background-color: forestgreen;
    color: #FFFFFF;
    border-radius: 4px;
    text-align: center;
    z-index: 2;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.info{
    display: block;
    position: fixed;
    bottom: 0;
    margin-bottom: 10px;
    margin-left: 4%;
    font-family: Arial;
    padding: 15px;
    background-color: blue;
    color: #FFFFFF;
    border-radius: 4px;
    text-align: center;
    z-index: 2;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}


Read more here: https://stackoverflow.com/questions/64939210/aligning-toast-messages-in-css

Content Attribution

This content was originally published by riderken at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: