Styling an IFrame With jQuery and CSS

It will only work with origin IFrames (coming from within your own website)


<script>
$('iframe').load( function() {
    $('iframe').contents().find("head")
      .append($("<style type='text/css'>  .yourCSS{background:#eee}  </style>"));
});
</script>

That’s pretty much it. Add the script where it needs to load. As an example, I used this to style the quoting feature within a textarea:

I believe there’s only very hacky ways of doing this if the IFrame isn’t coming from your own website. In those cases, it’s best to find the source of the IFrame and edit it directly, if this option is available to you.