Jquery.load displaces dialog box
<p>I have a problem with Jquery load in dialog box.</p>

<p>I spent all night trying to figure out why the dialog box shifts to the right side of the screen when I loaded another file. Apparently loading different pages can affect it randomly. It can be center but at the very bottom, but I don't know why it is happening. All I know is the loading another page into a dialog box displaces the dialog box from the center.</p>

<p>This is the code i have:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
    &lt;script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt; 
    &lt;link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.3/themes/ui-lightness/jquery-ui.css" type="text/css" media="all" /&gt;
    &lt;script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.3/jquery-ui.min.js"  type="text/javascript"&gt;&lt;/script&gt;
    &lt;script src="http://jquery-ui.googlecode.com/svn/tags/latest/external/jquery.bgiframe-2.1.1.js" type="text/javascript"&gt;&lt;/script&gt;
    &lt;script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.3/i18n/jquery-ui-i18n.min.js"   type="text/javascript"&gt;&lt;/script&gt;

    &lt;script src="ProfilePage/jqueries.js"&gt;&lt;/script&gt;           

    &lt;script type="text/javascript"&gt;
        $(
            function()
            {
               $("#box").load("jquery1.html").dialog({modal:true,height:400,width:400});          
            }            
        )         
    &lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;

    &lt;div id="parent" style="background-color:red;height:800px;width:800px;"&gt;
        &lt;div id="circle" style="position:relative;left:0px;height:800px;width:400px;background-color:green;float:left;"&gt;
        &lt;/div&gt;
       &lt;div id="box"&gt;
            I want milk
        &lt;/div&gt;
        &lt;div id="sds" style="position:relative;float:left;left:5px;height:800px;width:399px;background-color:yellow;"&gt;
        &lt;/div&gt;
    &lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>If I remove the load and just put a normal text in the div it works fine. 
Can someone suggest an idea? Thanks!</p>
