SO fiddle
Test Fiddle mainly for SO Questions
by Nick Craver
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/overcast/jquery-ui.css">
<div id="parent">
</div>
<div id="dialog">Test Content</div>
CSS
#parent { border: solid 1px #ddd; width: 500px; height: 400px; }
JavaScript
$("#dialog").dialog( { width: 200, height: 100 }).parent()
.position({ my: 'center', at: 'center', of: '#parent' });