Quantcast
Channel: Bootstrap modal appearing under background - Stack Overflow
Browsing index pages (71 articles)

Answer by Ömer Şerif Ataşman for Bootstrap modal appearing under background

it is worked for mefor bootsrap 5.0$(document).on('shown.bs.modal', function (e) { var modal_backdrop = 109; var modal = 110; $('.modal-backdrop').each(function (i, obj) { $(this).css({ "z-index":...

View Article


Answer by Slim for Bootstrap modal appearing under background

For Bootstrap 5, use "data-bs-backdrop"<div class="modal" id="myModal" data-bs-backdrop="false">

View Article


Answer by Code47 for Bootstrap modal appearing under background

Add the above CSS class and it will work:.modal-backdrop { position: fixed; top: 0; left: 0; z-index: -1;}

View Article

Answer by Tahmina for Bootstrap modal appearing under background

We just can add z-index by capturing backdrops created after the first$(document).on("click", `[data-bs-toggle="modal"]`, function(){ let backdrop = $(".modal-backdrop"); if(backdrop.length > 1){...

View Article

Answer by Aakash Bashyal for Bootstrap modal appearing under background

Use position absolute.modal {display: none; /* Hidden by default /position: absolute; / is positioned relative to the nearest positioned ancestor and moves along with page scrolling. /padding-top:...

View Article


Answer by DarkSterX for Bootstrap modal appearing under background

Just do this inside your css.modal-dialog{ pointer-events: auto;}NB: This property prevent modal-dialog container and all its child to be selected.

View Article

Answer by Nurs Still for Bootstrap modal appearing under background

Adding this in CSS made the trick for me..modal-backdrop.fade.show{ z-index:0;}

View Article

--- Article Not Found! ---

*** *** *** RSSing Note: Article is missing! We don't know where we put it!!. *** ***

View Article


Answer by Laurent Lyaudet for Bootstrap modal appearing under background

In my case the solution was simply that I forgot to add the "modal" class on the div with id "my-modal" that was promoted by $('#my-modal').modal('show');Since the content of the div had everything...

View Article


Answer by Daniël Hoffman for Bootstrap modal appearing under background

Update: The original JS method resulted in multiple clones of my modalbeing appended to the body, if the component is initialized multiple times. Instead, first confirm that the modal is notalready...

View Article

Answer by quent for Bootstrap modal appearing under background

The easiest solution is to move the modal dialog outside of any container and just declare it under the <body> element:<body> <div> ...<div><div class="modal"> ... modal...

View Article

Answer by danthefulcrum for Bootstrap modal appearing under background

I went through my HTML and discovered I had an unclosed <div> tag. Closing the <div> resolved the issue for me.PS: The <div> tag was neither an ancestor nor a child of the modal.

View Article

Answer by T. Czubaszek for Bootstrap modal appearing under background

For Angular:($('.modal-backdrop') as any).remove();

View Article


Answer by Július Ľuptovec for Bootstrap modal appearing under background

Havingtransform:translate3d(0, 0, 0);On any ancestor element can cause this as well. Tested on bootstrap 4.6.0.

View Article

Answer by Praneeth Pj for Bootstrap modal appearing under background

I resolved my issue by adding data-backdrop="false" to the div:<div class="modal fade" id="exampleModalCenter" data-backdrop="false" tabindex="-1" role="dialog"...

View Article


Answer by xadun for Bootstrap modal appearing under background

For those like me that added Bootstrap to Wordpress without the use of plugin or theme:I added bootstrap CSS and JS in the function.php file.Then, called the modal in a wordpress page.No matter what I...

View Article

Answer by thanos_zach for Bootstrap modal appearing under background

.modal-backdrop {/* bug fix - no overlay */ display: none;}

View Article


Answer by anon123 for Bootstrap modal appearing under background

The easiest solution I found, that worked for all my cases, was an answer in a similar post:Here it is:.modal { background: rgba(0, 0, 0, 0.5); }.modal-backdrop { display: none;}Basically, the original...

View Article

Answer by Mugasho Lincoln for Bootstrap modal appearing under background

Check your css to see if you have any blurs and filters. I removed this code from my css and the modal worked normally again.modal-open .main-wrapper { -webkit-filter: blur(1px); -moz-filter:...

View Article

Answer by Faraz Ali for Bootstrap modal appearing under background

For most people, this problem occurs when you place the modal code inside some other sections of the Html and not right at the end of your Html. And its definitely not possible to put all the modals at...

View Article
Browsing index pages (71 articles)


Latest Images