I've found here in SO these two ways to manipulate css style od div elements inside an iframe:
jQuery("iframe").contents().find(".rc-anchor-normal-footer").css("margin-left", "-60px");
and
jQuery("iframe").load(function() {
var doc = this.contentDocument || this.contentWindow.document;
var ancor_footer = document.getElementsByClassName("rc-anchor-normal-footer");
ancor_footer[0].style.marginLeft = "-60px";
});
They both were put inside the jQuery(document).ready(function(){})
but none of them works. If i try to give those commands inside firebug JS console I get
jquery.js?ver=1.12.4:2 Uncaught DOMException: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "http://www.pasticceriaimpero.com" from accessing a cross-origin frame.
even if I had set
document.domain = "www.pasticceriaimpero.it"
Wham am I supposed to do to make it work?
UPDATE
I managed to manipulate g-recaptcha
style with the following:
@media not screen and (max-aspect-ratio: 3/4) {
.g-recaptcha {
margin-top: 2px !important;
transform:scale(0.78);
transform-origin:0 0;
}
and witout accessing every single sub div of the recaptcha with jQuery...