Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiline title in dialog?

How can I have a JQuery Dialog with a title that is more than one line?

See this: http://jsfiddle.net/VKcJ7/7/

I've tried using a newline character, and fiddling with the JQuery UI CSS classes for the title & titlebar, but nothing seems to be working.

JS: / JQuery:

$(document).ready(function () {
    $('#dialog').dialog({
        autoOpen: false,
        modal: true,
        title: 'Something really long wow \n too much to have in a title but oh well'
        //adding the newline character \n does nothing!
    });
});

CSS:

.ui-dialog-title{

}

.ui-dialog-titlebar{

}
like image 736
James Avatar asked Jul 28 '14 13:07

James


1 Answers

The .ui-dialog-title has the css to make overflowing text to be truncated to ... (ellipsis).

white-space: nowrap;
text-overflow: ellipsis;

Using the below css instead should fix this.

white-space: normal;

Edit:

making white-space: normal will ignore the text-overflow declaration.

like image 160
Alok Swain Avatar answered Oct 13 '22 11:10

Alok Swain