Jump to content

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>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.