0

I have made an 'IFRAME' element through javascript, but now I want to add the css to that iframe , I have made another src , which is included in the website body, so its working fine, but the style doesn't work, Now, I have to add the style sheet to that frame which I have in another file but I don't know how to do it, can anyone please.

Na Dim Kh An
  • 33
  • 1
  • 8
  • Possible duplicate of [Add CSS to iFrame](http://stackoverflow.com/questions/6960406/add-css-to-iframe) – e666 Jul 17 '16 at 16:48
  • Possible duplicate of [How to apply CSS to iframe?](http://stackoverflow.com/questions/217776/how-to-apply-css-to-iframe) – Jacob Jul 17 '16 at 16:52

2 Answers2

1

Set options X_FRAME_OPTIONS - ALLOWALL on backend.

Dmitry Kalinin
  • 353
  • 2
  • 10
0

Just pass the style along with the iframe... no need for seperation.

iframeTag = document.createElement('iframe');
iframeTag.width = '1px';
iframeTag.height = '1px';
iframeTag.frameborder = '0';
iframeTag.style = '##INSERT STYLE';
idik
  • 667
  • 2
  • 6
  • 17