I am trying to style the snapwidget instagram feed, I want to make the border white. This is not a setting of the widget so I tried adding css. It seems that my css is not being detected since the content is in an iframe. Is there a way to force my css on the iframe content?
You can not change the styles of the page that resides within the iframe.
You can not directly apply styles to the inner IFrame element through parent window CSS class even though its domain is same as parent. As ,(All the iframe's domain is the same as the parent) .. Best thing you can do is ,to add your main style sheet to the IFrame using javascript or jquery.
Styling the Iframe ContentsIf you can edit the page, then you can add an external style sheet or styles right in the document just like you would style any other web page on your site.
It won't work unless the iframe is on the same domain due to same origin policy. http://javascript.info/tutorial/same-origin-security-policy
Check out Using CSS to affect div style inside iframe for an explanation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With