I have an iframe that contains a table with width=”100%”. I have a JavaScript event handler for the onLoad event of that iframe that resizes the iframe to have width equal to the scrollWidth of the iframe. The problem is, since the width of the table inside the iframe is based on the size of the iframe and the iframe’s width is based on the size of the table, the iframe can only ever increase in size regardless of what’s in the table!
Has anyone else been in this situation before? Does anyone know how to stop this situation from occurring without giving the table a fixed width?
Thanks
Not sure what kind of data your table is holding but if you set the table cell styles to white-space:nowrap then the table will not be able to wrap cell content and will instead force the iframe to scroll