Skip to content

Instantly share code, notes, and snippets.

@douglasmiranda
Last active December 8, 2022 19:29
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save douglasmiranda/cdccaafdead9ff542c2f697a2421de8d to your computer and use it in GitHub Desktop.
Save douglasmiranda/cdccaafdead9ff542c2f697a2421de8d to your computer and use it in GitHub Desktop.
Bootstrap Toasts - Top Right Fixed (+ Fix toast-container overlaping content)
/* https://getbootstrap.com/docs/5.0/components/toasts/ */
.toast-container {
position: fixed;
right: 20px;
top: 20px;
}
.toast:not(.showing):not(.show) {
display: none !important;
}
/*
<div class="toast-container">
<div class="toast d-flex align-items-center" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-body text-success">
Success!
</div>
<button type="button" class="btn-close ms-auto me-2" data-bs-dismiss="toast" aria-label="Close"></button>
</div>
</div>
*/
@TheJoshuaEvans
Copy link

Many thanks for this snippet! It is extremely useful!

@svinther
Copy link

very useful gist !

@Estevangomez
Copy link

Thanks Bro

@RusselFabroa
Copy link

Thanks

@axherrm
Copy link

axherrm commented Dec 3, 2022

Thanks

@mykhailo-monchak
Copy link

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment