Brian
Brian

Reputation: 27392

Line breaks between buttons in jQuery dialog box

I have a jQuery dialog box with three buttons.

It looks like: Would you like to proceed to the signup page?

          < More Info > < OK > < Cancel >

Is there any way to put a line break between buttons so that I end up with: Would you like to proceed to the signup page?

                        < OK > < Cancel >
                            < More Info >

Upvotes: 2

Views: 1042

Answers (2)

SLaks
SLaks

Reputation: 887345

Like this:

$('#dialog .ui-dialog-buttonpane button:last').css('clear', 'both');

You'll also need to make the button last, not first.

Upvotes: 1

CalebD
CalebD

Reputation: 5022

Use the dialogClass option to add a custom class to the dialog and then write some CSS to style the s in a way that makes them appear one per line. The best method I've found is setting float: none and clear: both.

Upvotes: 2

Related Questions