You could use a pop up box to display the iframe, this would allow you to open the box/window in a smaller size and then close it, that way you wont need to navigate away from the page you are on. However this would call for some special coding and/or a special file creation.
I would prefer Darryl's suggestion as custom CSS is easy and better, but im just not that good with CSS so maybe some others are and can provide you some details.
You can remove elements from an iframe page using Javscript. From W3:
var iframe = document.getElementById("myFrame");
var elmnt = iframe.contentWindow.document.getElementsByTagName("H1")[0];
elmnt.style.display = "none";
If you don't wish to go through scripting for each element, you can simply copy up the page you wish to display in an iframe, and on that page's custom head codes or even in the body, you can do something like:
.headerClass{display:none;}
.footerClass{display:none;}
And then voila. However, you might want to remove other elements from the page that might collide with elements you're trying to display because of iframe resizing, i.e; sidebars, widgets, etc.
-Jake
Thank you all for your response and suggestion, below my iframe on a site outside oxwall and my java script file that does not work? can you still help me? :
<iframe id="myevenements" src="https://...exempleoxwall/events" style="width:100%;height:100%;min-height:800px " > </iframe>
file.js :
var iframe = document.getElementById("myevenements");
var elment = iframe.contentWindow.document.getElementsByTagName("ow_header")[0];
elment.style.display = "none";
Gilles,
Is your "file.js" called to the page with the iframe in the <head> tags of said page? If not, then it's not picking up the script.
Something like:
<script src="file.js"></script>
In your <head> tags.
If not that, try changing your element variable value to:
iframe.contentWindow.document.getElementsByClassName("ow_header");