I've got an iframe tag in my HTML code. Into that there's a tag with a class: message_info. I want to modify the properties of this class but the css doesn't work.
I try this:
HTML:
<iframe src="https://www.tuttocampo.it/WidgetV2/Risultati/570ce2a7-5474-11e4-b2c1-448a5b2c3468" scrolling="no" class="iframe02" height="600" frameborder="0"></iframe>
CSS:
.iframe02 .message_info {
margin: 0 !important;
}
but this doesn't work.
While searching i found this JavaScript code:
<script>
const iframe = document.querySelector('iframe.iframe02');
const messageInfo = iframe.contentWindow.document.querySelector('.message_info');
messageInfo.style.margin = '0px';
</script>
but this also didn't work.