TOASTR ERROR BACKGROUND COLOUR IS WHITE...!
MakkiAbid opened this issue · comments
Muhammad Abid commented
Muhammad Abid commented
I'm using toastr.error
to display danger popup on my validation fields but its showing white background..!
ShoaibZhaid commented
just add this in your style
<style> #toast-container > .toast-error { background-color: #BD362F; } </style>
TA3PKS commented
I have the same problem
Laura Marina commented
me too!!, someone knows how to resolve this problem?
Elvi Mihai commented
I've tried this:
<!doctype html>
<html lang="en">
<head>
<!-- Toast CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css"
integrity="sha512-vKMx8UnXk60zUwyUnUPM3HbQo8QfmNx7+ltw8Pm5zLusl1XIfwcxo8DbWCqMGKaWeNxWA8yrx5v3SaVpMvR3CA=="
crossorigin="anonymous" />
</head>
<body>
<button onclick="error()">Click me!</button>
<script>
function error(data) {
toastr.options = {
preventDuplicates: true,
timeOut: 4000,
progressBar: true,
positionClass: "toast-top-center"
}
toastr.error(`Error!`, 'Error!')
}
</script>
<!-- jquery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<!-- Toast js Library -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js"
integrity="sha512-VEd+nq25CkR676O+pLBnDW09R7VQX9Mdiij052gVCp5yVH3jGtH70Ho/UUv4mJDsEdTvqRCFZg0NKGiojGnUCw=="
crossorigin="anonymous"></script>
</body>
</html>
And works good to me.
Victor Welters commented
Thomas commented
Boris commented
Nimesh Kasun commented
I've tried this:
<!doctype html> <html lang="en"> <head> <!-- Toast CSS --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css" integrity="sha512-vKMx8UnXk60zUwyUnUPM3HbQo8QfmNx7+ltw8Pm5zLusl1XIfwcxo8DbWCqMGKaWeNxWA8yrx5v3SaVpMvR3CA==" crossorigin="anonymous" /> </head> <body> <button onclick="error()">Click me!</button> <script> function error(data) { toastr.options = { preventDuplicates: true, timeOut: 4000, progressBar: true, positionClass: "toast-top-center" } toastr.error(`Error!`, 'Error!') } </script> <!-- jquery --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <!-- Toast js Library --> <script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js" integrity="sha512-VEd+nq25CkR676O+pLBnDW09R7VQX9Mdiij052gVCp5yVH3jGtH70Ho/UUv4mJDsEdTvqRCFZg0NKGiojGnUCw==" crossorigin="anonymous"></script> </body> </html>
And works good to me.
This worked for me. Thanks.