views:

211

answers:

2

hi i'm using the jquery ui dialog for viewing a form. this form is mutch height and so the top of the dialog is 0px

I want change this beacuse in the top of my window there is a menu bar

is possible? thanks

+1  A: 

use the position property

$('#some_dialog_selector').dialog({position:['center',10]});

this will open the dialog centered horizontally and 10 pixels from the top of the viewport..

Gaby
A: 

If I understand you correctly, you dialog is covering the menubar at the top of the window. So you want o manually place this dialog lower.

You can use the 'position' option. It can be 'right', 'left', 'bottom' or 'top' as below -

    `$("#register-dialog").dialog({
    bgiframe: true,
    height: 300,
    width: 400,
    modal: true,
            position: 'bottom'
    buttons: {`

Or you can position it at "right top". As shown here at the jquery site -

Specifies where the dialog should be displayed. Possible values: 'center', 'left', 'right', 'top', 'bottom', or an array containing a coordinate pair (in pixel offset from top left of viewport) or the possible string values (e.g. ['right','top'] for top right corner).

PlanetUnknown