2

Is it possible to load an external href src inside your iframe and then override the bg color of the external href src? Here's what I've tried:

<iframe src="https://www.externaldomain.com" style="background-color: #FFF !important;"></iframe>
TimNguyenBSM
  • 817
  • 2
  • 15
  • 33

1 Answers1

0

You can try with an event with javascript or jquery. Something like this:

function changeBackground(color) {
   document.body.style.background = color;
}

<BODY onload="changeBackground('red');">

change background color

Community
  • 1
  • 1
bugs2919
  • 371
  • 1
  • 8
  • that unfortunately does not change the bg color of the external href src that is loaded into the iframe. It only changes the bg of the document. – TimNguyenBSM May 11 '15 at 21:49
  • Chek this out. http://stackoverflow.com/questions/1291812/iframe-javascript-access-parent-dom-across-domains – bugs2919 May 11 '15 at 21:52