internet explorer - iframe zoom issue -


i attempting cross-browser css zoom work, have found here isn't working me.

here have:

html

<div id="themeframe"> <div class="themeframe-overlay"></div> <iframe src="/index.php"></iframe> </div> 

css

#themeframe{ position:relative; width:520px; height:400px; margin-top: 20px; border: none; overflow: hidden; }  #themeframe .themeframe-overlay{ position:absolute; z-index:95; left:0;top:0; height:100%;width:100%; background:#fff; opacity:0; filter: alpha(opacity = 0); }   #themeframe iframe { width:1040px; min-height: 800px; overflow: hidden; -moz-transform: scale(0.5); -moz-transform-origin: 0 0; -o-transform: scale(0.5); -o-transform-origin: 0 0; -webkit-transform: scale(0.5); -webkit-transform-origin: 0 0; -ms-transform: scale(0.5); -ms-transform-origin: 0 0; margin: 0; padding:0; border: none; } 

what trying achieve? have 520 x 400 div want filled 50% scaled version of webpage. shown above, have issues in ie, div/iframe correct size, webpage inside 100%, not 50%. working in every other browser. if add zoom:0.5; iframe css, fixes in ie, breaks in chrome.

i having trouble getting work in ie, chrome, safari, , firefox @ same time.

any thoughts?

found answer, @ least worked me. part of answer used following steps found here.

first, arrange html (i'm bad @ arranging code on site):

<div id="themeframe">     <iframe src="/index.php" id="frame" width="794" height="1550"></iframe > </div> 

then css looks this:

#themeframe {     overflow: hidden;     position: relative;     width:800px;     height:850px;     -ms-zoom: 0.75; }   #frame {     position: absolute;     overflow-x: hidden;     top: -300px;     -moz-transform: scale(0.75);     -moz-transform-origin: 0 0;     -o-transform: scale(0.75);     -o-transform-origin: 0 0;     -webkit-transform: scale(0.75);     -webkit-transform-origin: 0 0; 

the changes i'll point out are:

  1. i wrapped iframe in div called themeframe

  2. i gave iframe id style in css.

  3. i used -ms-zoom on wrapping div of themeframe not within iframe. because ie scale whole iframe set zoom size, not content within (which chrome , firefox do). important use -ms-zoom in css , not zoom since chrome go crazy , pay attention both zoom , -webkit if don't make ms distinction.

hope helps. works me in chrome, ff , ie8.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -