Modal loading tray size when content changes

I have a bootstrap modal window that contains a form. If the user submits the form, it is verified through Ajax. If there is any error, it is displayed above the form in modal (without reloading the page).

Thus, I need to resize the modality when the content changes. Any ideas?

+6
source share
3 answers

Have you tried not to set the height of the div?

+7
source

I have the same problem. I just delete the maximum height.

.modal-body { overflow-y: auto; /*max-height: 400px;*/ padding: 15px; } 
+5
source

As the last answer suggests editing the basic definition of css, I would discourage this, this is bad practice. In whatever.css, you can use CSS Point Score to rewrite it like this:

 div.modal-body { overflow-y: auto; max-height: none; padding: 15px; } 
0
source

Source: https://habr.com/ru/post/917768/


All Articles