Title: Custom CSS for iFrame content
Last modified: August 22, 2016

---

# Custom CSS for iFrame content

 *  Resolved [Anatoli Stancioff](https://wordpress.org/support/users/manate/)
 * (@manate)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/custom-css-for-iframe-content/)
 * Hello and thank’s for reading me,
 * I would like to change the CSS of some iFrame content (a class)
 * I saw a lot of option in Advanced iFrame settings to custom css but i didn’t 
   understand what syntax to use to apply it.
 * I would like to change CSS of “otw-row” class which is the first class in body.
 * The iFrame is from the same domain that the parent page.
 * Thank’s for your help and for this plugin!
 * [https://wordpress.org/plugins/advanced-iframe/](https://wordpress.org/plugins/advanced-iframe/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [mdempfle](https://wordpress.org/support/users/mdempfle/)
 * (@mdempfle)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/custom-css-for-iframe-content/#post-5441370)
 * Go to the section:
    Show only a part of the iframe or modify it -> See: Content
   id in iframe Content styles in iframe
 * In the first setting you define the element you want to change and in the 2nd
   the style.
 * so in your case you can do this in the administration of when you want to set
   it ass shortcode attribute:
    iframe_content_id = “.otw-row” iframe_content_styles
   = “background-color: #fff;”
 * Best, Michel
 *  Thread Starter [Anatoli Stancioff](https://wordpress.org/support/users/manate/)
 * (@manate)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/custom-css-for-iframe-content/#post-5441394)
 * Thank’s to you michel for your answer,
 * It’s crazy but what you told me is what i tried… and it’s not working…
 * In fact, i use the show only attribute to show only the otw-row class but before
   otw-row there is
    html.js and this last one present a margin top and a background-
   color that I would like to remove.
 * When i use the “Content id in iframe” and “Content styles” shortcodes, the frame
   display every class back and not only otw-row and styles are not applied.
 * I’m sorry, it’s a very strange problem… do you have any idea?
    thank’s for your
   answer
 *  Thread Starter [Anatoli Stancioff](https://wordpress.org/support/users/manate/)
 * (@manate)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/custom-css-for-iframe-content/#post-5441411)
 * Ok i found a way to change a background problem but One Problem persist,
 * If somebody knows how to remove the html.js margin-top of the iframe it would
   be so great!
 * I think this margin isn’t removable because it’s the website main margin but 
   i want to remove only the iframe margin and not the real website main top-margin:/
 * Thank’s for your help!
 * Anatole
 *  Thread Starter [Anatoli Stancioff](https://wordpress.org/support/users/manate/)
 * (@manate)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/custom-css-for-iframe-content/#post-5441413)
 * Ok once again thank’s ^^
 * I found how to “remove” this margin-top. In fact it’s not removing but compensate
   the margin.
 * If somebody have got the same problem you should in your css file add this lines
 * iframe
    { margin: -50px; }
 * note: and replace 50px by the value you need.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Custom CSS for iFrame content’ is closed to new replies.

 * ![](https://ps.w.org/advanced-iframe/assets/icon-128x128.png?rev=1028488)
 * [Advanced iFrame](https://wordpress.org/plugins/advanced-iframe/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-iframe/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-iframe/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-iframe/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-iframe/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-iframe/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Anatoli Stancioff](https://wordpress.org/support/users/manate/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/custom-css-for-iframe-content/#post-5441413)
 * Status: resolved