Overriding Bootstrap alert

Is there a way to override the bootstrap alert? I wanna make the ‘success’ alert more greener. I already tried creating a new class on the .css file, but it doesn’t work it goes back to the original white background color.

Example code:


.alert-greener {


    color: #4F8350;

    background-color: #4F8350;

    border-color: #d6e9c6;

}



php


if($model->request_status == 'On Going!')

            {

                return ['class' => 'greener'];

}






return ['class' => 'alert-greener'];



It doesn’t work too, I already did that.

you need to check if your class is being added to the bootstrap alert element

…Or override the alert-success class in your css


.alert-success {

    color: #4F8350;

    background-color: #4F8350;

    border-color: #d6e9c6;

}