Solved

Browser zoom on contents of iframe

Posted on 2014-01-14
6
659 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
  • 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

863 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now