I have a full HTML document that I'd like to include within an existing webpage on my website. This document is a completely standalone document with its own <html>
element, its own CSS styles, etc. I do not control this document.
I basically want my webpage to show the normal header/nav of my website, a little bit of metadata about the included HTML document, and then the document itself.
So far I've tried two approaches:
- Inserting the document as-is into a div on the page. Problems:
- I have to imagine this is semantically wrong in all sorts of ways
- Styles seem to "leak out" from the inner document and affect the outer content
- Put the document into an iframe. Problems:
- Links clicked within the iframe only navigate the iframe, not the outer page. I want links to behave as if they were part of the outer page.
- I'm having a hard time styling the iframe so that it simply extends as far down the page as it needs to to contain the document. I don't want scrollbars -- I just want to dump the whole document onto my page, however large it is.
Is there some other simple solution to this problem?