Search code examples
twitter-bootstrapwidthpopoverconfirmation

How to change bootstrap confirmation width


I'm using Bootstrap Confirmation (http://bootstrap-confirmation.js.org/) plugin.

<div class="col-xs-4 actions">
    <span class="btn btn-danger remove" data-confirm="confirmation" 
          confirm-title="Do you really want to remove item?" 
          data-singleton="true"><i class="fa fa-trash"></i></span>
</div>

$('[data-confirm=confirmation]').confirmation({
    title: function () { return $(this).attr("confirm-title"); },
    placement: 'bottom',
    btnOkClass: 'btn-xs btn-danger',
    btnOkLabel: '<i class="icon-ok-sign icon-white"></i> Tak',
    btnOkIcon: 'glyphicon glyphicon-trash',
    btnCancelLabel: '<i class="icon-remove-sign"></i> Nie',
    popout: true
});

Confirmation popover is too narrow. How to increase width of this popover?

Too narrow confirmation popover


Solution

  • The solution is to pass container parameter like this:

    $('[data-confirm=confirmation]').confirmation({
        title: function () { return $(this).attr("confirm-title"); },
        placement: 'bottom',
        btnOkClass: 'btn-xs btn-danger',
        btnOkLabel: '<i class="icon-ok-sign icon-white"></i> Tak',
        btnOkIcon: 'glyphicon glyphicon-trash',
        btnCancelLabel: '<i class="icon-remove-sign"></i> Nie',
        container: 'body',
        popout: true
    });