8

I'm simply trying to set the width of the dialog box, and I haven't succeeded (yet). I have added a CSS class, but the width set is the one of the dialog shade.

.dialogwidth800 {
    width : 800px;
}
...
ngDialog.openConfirm({
    template: 'templateRemove',
    className: 'ngdialog-theme-default dialogwidth800',
    scope: $scope
}).then(

EDIT : fiddle corrected with working solution here : https://jsfiddle.net/jr626fww/8/

GuillaumeS
  • 407
  • 1
  • 6
  • 16

2 Answers2

14

It can easily achieved by using custom css like below :

.ngdialog.ngdialog-theme-default.custom-width-800 .ngdialog-content {
    width: 800px;
}
.ngdialog.ngdialog-theme-default.custom-width-900 .ngdialog-content {
    width: 900px;
}

Use these css class when you open ngDialog :

To use custom-width-900

ngDialog.openConfirm({
    template: 'templateRemove',
    className: 'ngdialog-theme-default custom-width-800',
    scope: $scope
});

To use custom-width-900

ngDialog.openConfirm({
    template: 'templateRemove',
    className: 'ngdialog-theme-default custom-width-900',
    scope: $scope
});
Bhuwan Prasad Upadhyay
  • 2,916
  • 1
  • 29
  • 33
10

Apply width with class .ngdialog-content{width :100px !important;} Using !important is very important to override any css property

Bharat Bhushan
  • 2,077
  • 2
  • 21
  • 34