0

How to change the default style (bar color, content color, etc) of the dijit ConfirmDialog? Please see codes below. Neither width or color were changed for the Confirm Dialog.

var confirm = new ConfirmDialog({
    title: "Confirmation",
    content: "This is the content", 
    style: "width: 400px, color: grey"
}).show();
Alex W.
  • 546
  • 1
  • 7
  • 22

1 Answers1

1

I believe you just need to change the , to a semi-colon ;

var confirm = new ConfirmDialog({
    title: "Confirmation",
    content: "This is the content", 
    style: "width: 400px; color: grey"
}).show();

BTW, the color property in style is just the content color. To change the title bar background color, this link says:

You'd have to override the background-color on the .dijitDialogTitleBar css. For example,

<link rel="stylesheet" type="text/css" href="dojo-release-1.6.1-src/dojo/resources/dojo.css" />
<link rel="stylesheet" type="text/css" href="dojo-release-1.6.1-src/dijit/themes/claro/claro.css" />

<style> .claro .dijitDialogTitleBar { background-color: #00FF00 } </style>

Here, the color is changed to green.

aichao
  • 7,375
  • 3
  • 16
  • 18
  • thanks, worked. do you know what attribute is for the dialog title bar color? – Alex W. Aug 08 '16 at 00:36
  • For that you need to override the default theme for the dijit Dialog. See [this](http://dojo-toolkit.33424.n3.nabble.com/how-to-change-the-bgcolor-of-the-dojo-dialog-title-bar-td2930155.html) for guidance. Note that a ConfirmDialog is derived from Dialog. If you are going to make wholesale changes to the theme (i.e., by default this is claro.css), you may want to develop your own theme to use. – aichao Aug 08 '16 at 01:43