Jump to content

DIV Over An Iframe...Possible?


refiking

Recommended Posts

Hi all,

 

I want to use an iframe to embed a pdf file on a page.  However, I also want to place a div with a black background over the first 80 pixels of the iframe itself (thus, removing the ability to click on print, zoom, next page, etc.).  My question is this....is that possible?  Here's the code I'v tried to no avail so far:

 

<iframe frameborder="0" id="myFrame" src="http://www.hbo.com/guidepdf/2009-12/hbo_dec09_ee.pdf" style="display:block" width="800" height="600">
<div style="position:absolute; background-color:#000;height:80px;width:800px;"></div>
</iframe>

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/185405-div-over-an-iframepossible/
Share on other sites

pass the toolbar as 0 to the iframe....if you do this the toolbar will be hidden... however user always has final control over this and can change it.....but for most users they wont know how to do it:

 

<iframe frameborder="0" id="myFrame" src="http://www.hbo.com/guidepdf/2009-12/hbo_dec09_ee.pdf#toolbar=0" style="display:block" width="800" height="600">
<div style="position:absolute; background-color:#000;height:80px;width:800px;"></div>
</iframe>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.