+ 1
how to apply css style on iframe content from an external domain?
iframe
5 ответов
+ 5
from what I have gathered changing css in an iframe may or may not work you can try researching a bit and try but it will not for most sites.
this will work on same-origin sites you will need JavaScript
https://stackoverflow.com/questions/23873407/how-to-style-inside-an-iframe-from-an-external-domain
to override domain this may work
https://stackoverflow.com/questions/6494721/css-override-body-style-for-content-in-iframe/13959836#13959836
some old read with which this worked and not worked https://www.sitepoint.com/jquery-change-css-iframe-content/
+ 4
If I understood you correctly, you want to apply CSS onto an external website that you're displaying in your iFrame? If so, you don't unless you have access to that external server.
PS - If you figure out a way, let me know. :D
+ 3
This only is possible if the iframe's domain is the same as the parent.
If it's the case, then you can set the style of the embed page like that:
<link type="text/css" rel="Stylesheet" href="Style/simple.css" />
Source: https://stackoverflow.com/questions/217776/how-to-apply-css-to-iframe
0
yeah that's right, we will wait for someone to help us. maybe he has an answer. ok sure I let you know.
0
I tried all of that but nothing works