-1

with iframe i embedded a page to my site like this.

<iframe src="https://www.w3schools.com" width="80%" height="200">
<p>Your browser does not support iframes.</p>
</iframe>

now w3schools.com uses w3-row w3-white w3-padding w3-hide-medium w3-hide-small class in header and i want to hide it in my page? How to perform this.?

Amir
  • 200
  • 3
  • 12
  • 3
    You cannot modify the content of an iframed page unless the loaded page is within the same domain. – nitobuendia Mar 11 '17 at 15:25
  • Possible duplicate of [CSS override body style for content in iframe?](http://stackoverflow.com/questions/6494721/css-override-body-style-for-content-in-iframe) – andreas Mar 11 '17 at 15:30
  • not same domain its differ domain – Amir Mar 11 '17 at 15:45

1 Answers1

0

If your iframe loads an address from same domain, Set an id for your frame and do this:

var frame = window.frames['myFrame'];
$(frame).contents().find('p').hide();
Farzin Kanzi
  • 3,380
  • 2
  • 21
  • 23