A: 

Here is how to find the problem because no one can use your code to reproduce the problem without having all of the dependencies.

Get Firefox with the Firebug

http://getfirebug.com/

You can select elements within the browser and get all of the CSS and HTML for that element then change these values so that you can find what the problem is. This is a must for UI development.

In addition you can debug JavaScript by setting breaks in the code live.

Todd Moses
thanks, I think the dependencies are quite easy, they are jQuery lib files. I did use Firebug to investigate the css generated by jquery, and found iframe width is 'auto', not the value should be set by resize() method.
Matt
A: 

My plugin extends jQueryUI's dialog, but handles the resizing/flow of an iFrame for use in this type of scenario...

http://plugins.jquery.com/project/jquery-framedialog

Tracker1