Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't change css modal bootstrap. Modal fade in bootstrap auto add padding-left 15px

I created this question but there is no answer. so i recreated.

I use modal bootstrap. When no scroll bar appears, everything is normal. But when I add more data, modal auto add style="display: block; padding-left: 15px;":

<div class="modal fade in" id="tags_modal" role="dialog" style="display: block; padding-left: 15px;">

I try change it but I can't. My code: https://jsbin.com/fusinoc/1/edit?html,css,output

My layout: my layout

like image 212
Nam Lê Quý Avatar asked Nov 13 '17 07:11

Nam Lê Quý


People also ask

What is modal fade in Bootstrap?

The .fade class adds a transition effect which fades the modal in and out. Remove this class if you do not want this effect. The attribute role="dialog" improves accessibility for people using screen readers.

How do I stop modal popups automatically?

Inside the Open event handler of the jQuery UI Dialog Modal Popup box, using the JavaScript setTimeout function and the jQuery UI Dialog “close” command, the jQuery UI Dialog Modal Popup box is set to automatically close after delay of 5 seconds (some seconds). This dialog will automatically close in 5 seconds.

Is Bootstrap modal responsive?

Bootstrap modals are supposed to be responsive by default. Something to look out for is if you have a width set on your Modal.

How do I stop my modal from closing when I click outside?

How do I stop closing the modal when I click outside? Data-keyword="false" is to prevent closing modal while clicking Esc button, while data-backdrop="static" , allows you keep modal pop-up opened when clicking on Gray area.


1 Answers

Instead of adding styles inline, add below code in your css.

#myModal2 {
  padding-left: 0 !important;
}

working bin

Hope this helps :)

like image 191
Mr.7 Avatar answered Oct 23 '22 06:10

Mr.7