How can i filter what information comes up in an iFrame?
Currently what is coming up in my iframe atm is;

but i want to filter it to;

?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t do anything with the iFrame contents if the domains are different, as you can see here and on a number of related questions. Though these typically center around using Javascript to modify the contents, the same limitations apply to CSS.
If these are on the same domain, you can do it with Javascript using answers like this.
If it’s not on your domain, there are a few solutions for you to pick from. The first one is just
HTMLandCSSand works if the iFrame is at the very top of your page, or if you hide the top of the iFrame behind another element, like an image: you could use negativemarginandoverflow: hidden;to hide the scrollbars. Check it out on JSFiddle here.HTML:
CSS:
Though the
scrolling="no"attribute isn’tHTML5-valid, it’s necessary to get rid of the bars in Chrome, as far as I know.The second solution involves loading your external page internally, then pointing to that page. This gives you full control over the contents and styling of the page you’re loading. You can do this with a number of languages, but I’ll post how you’d do it with
PHP.Firstly, point your iFrame to a page on your domain, where you’ll place the content.
Then in
local-content.php, you begin by loading the targetHTMLfile into aDOMDocument.Then you modify it all you want using the PHP DOM functions. An example would be adding a stylesheet to it:
Add that to the
headof your page:Then, of course, you output the whole thing: