I am writing a Safari extension. It needs to overlay content from another source on top of the page when I click a button in the toolbar.
How do I position it at the top left corner of the browser, on top of the content? When I click the close button the iframe should be destroyed, displaying the content that was previously covered up?
Thanks!
You can put the CSS either inline or in a stylesheet.
Then, for your “close” link, you have a choice of either completely destroying the iframe:
or just hiding it:
Personally, I’d just hide it so you could re-use it again by changing the source: