I have an iframe:
If something.html from externaldomain.com has the css:
Use the following syntax it will work.
Give the style="position:relative;" to your iframe it will work in IE.
iframe must have attribute ID
window.parent.document.getElementById('iframeid').contentWindow.document.execCommand('print', false, null);
As a workaround, if all else fails, you can download the contents of something.html using server-side logic, like ASP.NET or PHP, and save it on your local web-server somewhere. Then you can avoid the same-origin policy, or you can even modify the HTML/CSS yourself on the server, for ex., remove the offending position:relative.
I would start by reading this Another Cross Domain iFrame Communication Technique and then look at a more elegant AJAX solution. I have seen a lot of situations where cross-domain iframes just don't work (and for good reason).
IFrames are one step above IE in the Axis of Evil (IMO)