 <p>I ran into a similar problem once. What you can try is like </p> <pre><code>var cssLink = document.createElement("link") cssLink.href = "style.css"; cssLink .rel = "stylesheet"; cssLink .type = "text/css"; window.frames[0].document.body.appendChild(cssLink); </code></pre> <p>Try this out it may help you though i'm not sure but it worked for me. Where the style.css is the css file where you specify your styling for the frame</p>