Solved

Browser zoom on contents of iframe

Posted on 2014-01-14
6
718 Views
Last Modified: 2016-09-14
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
Comment
Question by:Webspeeder
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 3

Expert Comment

by:fredvr666
ID: 39779424
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
 

Author Comment

by:Webspeeder
ID: 39779519
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
 
LVL 3

Expert Comment

by:fredvr666
ID: 39779645
index-x means:
element with greater stack order is always in front of an element with a lower stack order.
0
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 

Author Comment

by:Webspeeder
ID: 39780187
I know what z-index means, but you put /* FF scrolling */ next it, what do you mean by that?
0
 
LVL 3

Accepted Solution

by:
fredvr666 earned 500 total points
ID: 39780461
The scrolling inside a iframe doesn't worked, but you can remove that
0
 

Expert Comment

by:Ankit Kamdar
ID: 41797726
After adding position: absolute, iframe gets hidden
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question