Here is my test JavaScript for you to reproduce the problem: You will see iframe width is just about half of dialog wide. It seems that jQuery change iframe width to 'auto' instead of using the value I indicate.
<html> <head> <link rel="stylesheet" href="./styles/smoothness/jquery-ui-1.7.2.custom.css" type="text/css" media="screen" /> <script type="text/javascript" src="./scripts/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="./scripts/jquery-ui-1.7.2.custom.min.js"></script> <script type="text/javascript">var $E = {}; $E.modal = function(params) { return new function(params) { if (!params) { params = {width: 400, height : 300}; } var $obj = $("<div style='margin:0px;padding:0px;'></div>"); var self = this; // parse json object to url query string var generateQueryString = function(data) { queryString = ""; for (var o in data) { queryString = queryString + "&" + o + "=" + data[o]; } return queryString.replace(/^&/,"?"); }; // function - resize var resize = function(modal, frame) { frame.attr({ width : modal.width() , height : modal.height() }); }; this.frame = $(document.createElement("iframe")); this.url = ""; this.modal = $obj; /* * url : required, String, iFrame - src, * params : not required, json object, get args */ this.load = function(url, params) { var queryString = generateQueryString(params); var url = url + queryString; this.frame.attr({ src : url }); this.frame.dialog("open"); this.frame.css('border','3px solid red'); //in order to show iframe cant be as wide as its outer dialog container. resize(this.modal, this.frame); }; this.close = function() { this.modal.dialog("close"); }; this.frame.appendTo($obj); this.frame.dialog($.extend({ autoOpen : false, modal : true, draggable : true, resizable : true, resize : function() { resize(self.modal, self.frame); }, drag : function() { resize(self.modal, self.frame); } }, params)); }(params); }; // click link $(function() { $('a').click(function(e) { e.preventDefault(); var $this = $(this); $E.modal({width:540,height:400}).load("2.html", {s_in_bank_key:'',s_in_acct_num:''}); }); }); </script> </head> <body> <ul> <li><a href="http://www.google.com" title="Google Dialog">Google</a></li> <li><a href="http://jquery.com" title="jQuery Dialog">jQuery</a></li> <li><a href="http://jqueryui.com" title="jQuery UI Dialog">jQuery UI</a></li> </ul> </body> </html>
Please note that 2.html can contains anything.