As an addition to the accepted answer, if you need relative positioning within an element, consider the following solution:
// Assuming you have initialized a jquery-ui dialog as shown below
$('#someDialog').dialog({position: {my: 'top',
at: 'left top',
of: '#content'},
appendTo: '#content'});
The code above creates a dialog within the div with id "content". How do we then specify the position of the dialog relative to the "#content" element?
// Move the dialog to x = 200, y = 50 relative to #content
$('#someDialog').dialog({position: {my: 'left+200 top+50',
at: 'left top',
of: '#content'},
appendTo: '#content'});
This code positions the dialog relative to the content by adding +200px to the left and +50px to the top. The positioning values must align with the "at" parameter 'left top' for it to function correctly. While documented, making it work may require additional effort. You can use dynamic inputs in place of "my". I utilize the dragstop event to track dialog locations and restore them later.