Celebritie-photo
New Member
I'm working on a chrome extension that needs to insert a position fixed iframe into the top of some webpages. I have no control over the pages that will be modified. At the moment I can insert the iframe but it covers up some of the page, but I want to be able to reserve space for it. Problem is when I add a margin or padding to the body of the page, the other fixed elements on the page don't tally up with where they're meant to be.How can I inject an element with javascript that I can be 100% sure that it will show at the top of the page and not hide anything under it, or mess up the positions anywhere else?