Bootstrap modal not displaying

I tracked down the reason.

Just to give it some general usefulness to anyone coming to this question. If you can't figure out what's wrong, try doing a 'search all' for any classes of 'modal' 'fade' 'fade in' and 'hide' in any style sheets in your application.

I had a single instance of 'fade' being defined in a random css file, and that's what was stopping it displaying as it was overriding bootstrap. Once I deleted the reference, everything was ok.


I had the same problem. For me the cause was the use of Bootstrap 5 with outdated data-toogle and data-target attributes in the launch button:

After the correction of

<button type="button" class="btn" data-toggle="modal" data-target="#myModal" >

to

<button type="button" class="btn" data-bs-toggle="modal" data-bs-target="#myModal"> 

it ran correctly.


If you've upgraded from Bootstrap 2.3.2 to Bootstrap 3 then you'll need to remove the 'hide' class from any of your modal divs.;