Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 825
  • Last Modified:

Browser zoom on contents of iframe

Hey all.

We have a site where we are transitioning out of frames / frame sets and are using an iframe for now.

The iframe is contained in an HTML file that has a fixed width of 1024px. The iframe itself is X % of that 1024px.

When a user navigates to a page that is displayed within the iframe and they use the browser zoom (alt / cmd + +/-), contents of the iframe get larger and elements on the right side of the page become hidden. If the page was not inside a fixed width iframe then it would expand accordingly but they become hidden.

I've tried changing the width of the iframe in the parent page when zoomed but that doesn't' work properly.

Any ideas? I can post a mockup on jsfiddle is need be.

...
0
Webspeeder
Asked:
Webspeeder
  • 3
  • 2
1 Solution
 
fredvr666Commented:
Is ued it like this:
css:
#textiframe {
      position:absolute;
      margin:0px 0px 0px 0px;
      padding:0px;
      top:90px;
      height:457px;
      width:1024px;
      left:175px;
      z-index:2;      /* FF scrolling*/
}

Html:
<iframe id="textiframe" name="textiframe" allowtransparency="true" frameborder="0" marginheight="0" vspace="0" ></iframe>
0
 
WebspeederAuthor Commented:
I don't know that I want to use absolute positioning on the iframe, what exactly does this do? Meaning, does the z-index allow it to "flow" with contents?

I sort of fixed the issue with expanding the "page container" on which the iframe is located. Problem is that when I expand it on zoom in, I can't get it back to normal on zoom out.
0
 
fredvr666Commented:
index-x means:
element with greater stack order is always in front of an element with a lower stack order.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
WebspeederAuthor Commented:
I know what z-index means, but you put /* FF scrolling */ next it, what do you mean by that?
0
 
fredvr666Commented:
The scrolling inside a iframe doesn't worked, but you can remove that
0
 
Ankit KamdarCommented:
After adding position: absolute, iframe gets hidden
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now