Solved

Browser zoom on contents of iframe

Posted on 2014-01-14
6
645 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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

757 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

22 Experts available now in Live!

Get 1:1 Help Now