1
I’m using this code to get results from the lotteries, specifically the Mega Sena, and I need to style the text that the iframe brings. The result that iframe pulls is like XML, I’m not sure, but I need to take the characters that are appearing along with the text and leave only the text, then I need to style type center, put color in the text, change position, as if to diagram, I tried with CSS, but it didn’t work the styles in the text, only at the bottom of the text. If you can help me, I’d like to thank you.
This is my HTML code I use:
<iframe name="iframe1" id="iframe1" src="http://api.onemidia.tv.br/igor.php"
frameborder="0" border="0" cellspacing="0"
style="font-family: verdana;width: 100%; height: 100%;"></iframe>
<link rel="stylesheet" type="text/css" href="style.css"/>
And this is my CSS code that I use:
iframe{
width: 100%;
height: 100%;
color: red;
font-family: arial;
background: #74E8B8;
}
iframe is an "element" drunk on the page, is an external content that you search and render inside your document, and unfortunately there is nothing you can do to change it, be it font color, icon or image, even for security and rights.
– hugocsl
I understood, but with PHP from?
– jose113
If the source of the iframe is from the same domain you can change.
– Sam
@Sam how can I change?
– jose113
You can only do it with Javascript. It gives a search that you will find numerous examples.
– Sam
Okay, I appreciate the help.
– jose113