Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsIFrameIFrameHow to pad IFrame page?How to pad IFrame page?
Previous
 
Next
New Post
8/8/2010 4:57 AM
 
Hi, I have added an IFrame to one of my site's pages and it works, the issue I want to solve now is to pad the contents of the page as I want to display information way down in the page. Is there a way of padding the inner page to display a fixed height of something within the IFrame page. At the moment it is displaying the top of the page right to the height I specified and would like it to start the display lower. Another question, Is it possible to make the frame readonly, please assist, Thank you
 
New Post
8/8/2010 9:56 AM
 
You can do this using some creative CSS. The code below will allow you to grab just a part of a target page to show in an iframe. You will need to drop the iframe module and use the html module instead with this code inserted:

<style>
    #outerdiv
    {
    width:446px;
    height:246px;
    overflow:hidden;
    position:relative;
    }
    #inneriframe
    {
    position:absolute;
    top:-412px;
    left:-318px;
    width:1280px;
    height:1200px;
    }
</style>
<div id="outerdiv">
</div>

The outerframe width and height are for the part of the page you want to show.  Top and left are the positions of where you want the page to start showing and the innerframe width and height are the size of the target page if it were in a regular browser. i.e. Total size of the page.
 
New Post
8/8/2010 10:12 AM
 
This forum won't let me show the code exactly.

You need to add the code below between the bottom div tags of code above:

-iframe src="http://www.mywebsite.com/" id='inneriframe' scrolling=no--/iframe-

Replace hyphens above with less than/ greater than signs.
 
New Post
8/11/2010 3:14 AM
 
Thanks Greg, but would you happen to know if it is possible to have the frame as a read only, that is if there is a link shown, users cannot click this???
 
New Post
8/11/2010 10:05 AM
 
Yes you can do it but it isn't super easy.

The solution to that uses CSS and involves adding a transparent gif over the top of the entire iframe with a z-index higher than the iframe.  This way the visitor can see through the gif to read the iframe but if they click they will be clicking on the gif instead of the iframe.

Just do a Google search for "disable links in iframe"  and you will find quite a few tutorials on how to do this.
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsIFrameIFrameHow to pad IFrame page?How to pad IFrame page?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out