Change the text color of an iframe

Asked

Viewed 389 times

0

It is possible to change the color of a text iframe?

<div class="col-md-10 padding" style="background-color:white;">                    
    <iframe height="500" scrolling="no" name="Resultado" src="rastreamento.aspx?post=JT720196464BR"></iframe>
</div>
  • For security measure, no, except you integrate them (in this case, you will have to be able to change the source code of the site you are loading via iframe)

1 answer

5


The function of iframe is to open an external document on your web page, either localhost or external. Some javascript solutions can help you do what you want, but only if it’s a document on the same server.

So the answer is no, because it’s the same thing that you want to edit a facebook that isn’t yours, ever thought?!.

But, you can create a copy of the external page on your server using PHP:

file_get_contents(/* string: url da página */)

And apply the CSS styles you want to the returned string, you can even create a "version" of the original page on your server, with your own styles and scripts.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.