0

I have seen questions here about changing the CSS of iframe content from a parent site/page. However, i want the child page to detect if it is in an iframe and then change the CSS.

Thus this should be in the embedded page:

iframe body{color: red;}

This doesn't work. Is there a way to make it work or do I need to use JavaScript?

1 Answers1

0

You should apply CSS to the iframe tag.
Like:

iframe {
  color: red;
}

This will work as expected.

Rajat Verma
  • 301
  • 2
  • 13