Quantcast
Channel: Bootstrap modal appearing under background - Stack Overflow
Browsing latest articles
Browse All 71 View Live

Answer by Nabeel for Bootstrap modal appearing under background

Solution is to put modal directly under body tag. if that is not possible for some reason then just add overflow: visible property to tag enclosing the modal. or just use the following code:...

View Article



Answer by Mo. for Bootstrap modal appearing under background

I had the similar issue only for iOS devices. Solution was by removing -webkit-overflow-scrolling: touch from parent element

View Article

Answer by cuneyttnc for Bootstrap modal appearing under background

Try this code to CSS. .modal-open { overflow: hidden !important; } .modal-open *{ position:unset; z-index: 0; } .modal-open .modal-backdrop { position: fixed; z-index: 99998 !important; } .modal-open...

View Article

Answer by sivi911 for Bootstrap modal appearing under background

For me the easiest solution was to put my modal in a wrapper with absolute position and z-index higher than .modal-backdrop. Since modal-backdrop (at least in my case) has z-index 1050:...

View Article

Answer by Glade Mellor for Bootstrap modal appearing under background

I simply removed the position: fixed style from the _modal.scss file and it seems to work fine for me. I still have the background and it works as expected. // Modal background .modal-backdrop { /*...

View Article


Answer by Dapeng114 for Bootstrap modal appearing under background

This worked for me: sass: .modal-backdrop display: none #yourModal.modal.fade.in background: rgba(0, 0, 0, 0.5)

View Article

Answer by Sadmi for Bootstrap modal appearing under background

According to the previous answers this could happen for several reasons for me the problem was referencing two different Bootstrap links without knowing, so remove one of them solves the problem. in my...

View Article

Answer by kunal kumar for Bootstrap modal appearing under background

function addclassName(){ setTimeout(function(){ var c = document.querySelectorAll(".modal-backdrop"); for (var i = 0; i < c.length; i++) { c[i].style.zIndex = 1040 + i * 20 ; } var d =...

View Article


Answer by Cam Tullos for Bootstrap modal appearing under background

This would cover all modals without messing up any of the animations or expected behavior.. $(document).on('show.bs.modal', '.modal', function () { $(this).appendTo('body'); });

View Article


Answer by Ckevyn Ovalle for Bootstrap modal appearing under background

In my case solve it, add this in my stylesheet: .modal-backdrop{ z-index:0; } with google debugger, can examine element BACKDROP And modify attributes. Goog luck.

View Article

Answer by NicK Kamimura for Bootstrap modal appearing under background

I had some problem like this on Iphone and Ipad using Sharepoint 2013 Modal bootstrap keep z-index problems with backdrop. I just use this on JS : $('#myModal').on('shown.bs.modal', function() { //To...

View Article

Answer by JM Tee for Bootstrap modal appearing under background

I have a lighter and better solution.. It could be easily solve through some additional CSS styles.. hide the class .modal-backdrop (auto generated from Bootstrap.js) .modal-backdrop { display:none;...

View Article

Answer by Houdini Sutherland for Bootstrap modal appearing under background

CAREFUL WHEN APPENDING TO THE BODY! This will definitely get that modal from behind the backdrop: $('#myModal').appendTo("body").modal('show'); However, this adds another modal to the body each time...

View Article


Answer by RaymondLe for Bootstrap modal appearing under background

I was fixed this by adding style below to DIV tag style="background-color: rgba(0, 0, 0, 0.5);" And add custom css .modal-backdrop {position: relative;}

View Article

Answer by Takei for Bootstrap modal appearing under background

Add this one to you pages. It work for me. <script type="text/javascript"> $('.modal').parent().on('show.bs.modal', function (e) {...

View Article


Answer by Wahyu Primadi for Bootstrap modal appearing under background

Just add two lines of CSS: .modal-backdrop{z-index: 1050;} .modal{z-index: 1060;} The .modal-backdrop should have 1050 value to set it over the navbar.

View Article

Answer by Jeong-min Im for Bootstrap modal appearing under background

I had same problem and also check Muhd's answer. But, my modal needs left, top attribute, so just change fixed position to absolute and it worked. .modal { position: absolute; }

View Article


Answer by A Mohudum Kamil for Bootstrap modal appearing under background

set the z-index .modal to a highest value For example, .sidebarwrapper has z-index of 1100, so set the z-index of .modal to 1101 .modal { z-index: 1101; }

View Article

Answer by Chris Rosete for Bootstrap modal appearing under background

I had this issue and the easiest way to fix it was addind z-index greater than 1040 on the modal-dialog div: <div class="modal-dialog" style="z-index: 1100;"> I believe bootstrap create a div...

View Article

Answer by user109764 for Bootstrap modal appearing under background

$('.modal').insertAfter($('body'));

View Article

Answer by ttong for Bootstrap modal appearing under background

what i find is that: in bootstrap 3.3.0 it's not right,but when in bootstrap 3.3.5 it's right.let's see the code. 3.3.0: this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')...

View Article


Answer by Richard Nalezynski for Bootstrap modal appearing under background

This problem can often be experienced when using things like gradients in CSS for things like backgrounds or even accordion headers. Unfortunately, modifying or overriding core Bootstrap CSS is...

View Article


Answer by Javed Iqbal for Bootstrap modal appearing under background

none of the suggested solutions above worked for me but this technique solved the issue: $('#myModal').on('shown.bs.modal', function() { //To relate the z-index make sure backdrop and modal are...

View Article

Answer by Krishnendu for Bootstrap modal appearing under background

Solution provided by @Muhd is the best way to do it. But if you are stuck in a situation where changing structure of the page is not an option, use this trick: <div class="modal fade" id="myModal"...

View Article

Answer by CodeBriefly for Bootstrap modal appearing under background

I removed modal backdrop. .modal-backdrop { display:none; } This is not better solution, but works for me.

View Article


Answer by alright for Bootstrap modal appearing under background

Add this to your style sheet: .modal-backdrop { background-color: #000; bottom: 0; left: 0; position: fixed; right: 0; top: 0; z-index: 0 !important; }

View Article

Answer by Sid for Bootstrap modal appearing under background

Also, make sure that version of BootStrap css and js are the same ones. Different versions can also make modal appearing under background: For example: Bad: <link...

View Article

Answer by PieterVK for Bootstrap modal appearing under background

I have also encountered this problem and none of the solutions worked for me until i figured out i actually don't need a backdrop. You can easily remove the backdrop with the folowing code. <div...

View Article

Answer by Adam Albright for Bootstrap modal appearing under background

The problem has to do with the positioning of the parent containers. You can easily "move" your modal out from these containers before displaying it. Here's how to do it if you were showing your modal...

View Article



Image may be NSFW.
Clik here to view.

Bootstrap modal appearing under background

I have used the code for my modal straight from the Bootstrap example, and have included only the bootstrap.js (and not bootstrap-modal.js). However, my modal is appearing underneath the grey fade...

View Article

Answer by Office Assistant for Bootstrap modal appearing under background

Make Opacity to 1.modal{ opacity:1; }

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 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 thanos_zach for Bootstrap modal appearing under background

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

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 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 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 T. Czubaszek for Bootstrap modal appearing under background

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

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 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 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 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

--- Article Not Found! ---

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

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

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 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 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 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 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 Ö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

Browsing latest articles
Browse All 71 View Live




Latest Images