I am trying to use a Bootstrap modal to launch more information about an event, it is kind of working... but the screen darkness over the modal and I am unable to close the modal.
This is probably more a bootstrap problem, it has been some years since I used it myself, but I think you might have a problem with the stacking context of your html.
If you right click your page, and select "inspect element" you will probably see that the .modal-backdrop element is placed on top of everything else. This is typically because the stacking context of your .modals is different. A solution could be to move your .modals to your <body> element.
Bootstrap modal not quiet working
I am trying to use a Bootstrap modal to launch more information about an event, it is kind of working... but the screen darkness over the modal and I am unable to close the modal.
See image:
@inherits UmbracoViewPage
@using USNOptions = USNStarterKit.USNEnums.Options;
@{ var currentPage = Umbraco.TypedContent(UmbracoContext.Current.PageId);
}
Hi Kathryn
This is probably more a bootstrap problem, it has been some years since I used it myself, but I think you might have a problem with the stacking context of your html.
If you right click your page, and select "inspect element" you will probably see that the
.modal-backdrop
element is placed on top of everything else. This is typically because the stacking context of your.modal
s is different. A solution could be to move your.modal
s to your<body>
element.Thank you for the response. I inspected my modal and found the modal-backdrop was not before the actual container with the modal...
In case the issue not fixed yet I suggest to make the modal as a direct child of body.
That worked! Amoungst some other tweaking. Thank you.
I suggest to select the appropriate fix as solution for this post.
You need to make your modal to be the last child of the body tag. In your .js file:
link to SO question
is working on a reply...