Search code examples
jqueryjquery-uijquery-ui-dialog

Does jQuery .dialog() have a default width?


If I don't specify the width parameter for a jQuery modal dialog, what width will the dialog window have when opened?

$(foo).dialog('open') 

Is it 300?

Where is it specified?


Solution

  • In the jquery-ui.css CSS file, line 228.

    If you'd like to override it, just add this chunk of code to your own CSS file and it should work:

    .ui-dialog {
      width: 400px;
    }