1 (edited by smallblades 2011-02-07 09:36:03)

Topic: Damn IE7....

Hi, I'm using Simpleviewer on my web Site, but it does not work properly on IE7.
I'm using an iframe wich recalls index.html of SimpleViewr galley but it does not fit the container or resize correctly.
It works properly on other browser and on IE8.

My web site is: www.smallblades.it

Could you Help me?

Thanks and my compliments to web designers :-)

Re: Damn IE7....

Try giving your iframe a width and height and you also have some HTML errors that you might want to take a look at to get your page working in IE7.


Mike Richards
SimpleViewer Support Team.

3 (edited by smallblades 2011-02-12 08:21:14)

Re: Damn IE7....

How many mistakes... interesting :-)

well.... my iframe is adaptative: its heigth and width fill the container.

I've found the solution with Javascript!!!
It does NOT work for RESIZING, but it's better than nothing :-)

Here it is:

    <!-- 100% IE7 Bug Fix by Lametti Federico - www.smallblades.it -->
        <script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
        <script type="text/javascript">
            var browserName=navigator.appName;
            if (/MSIE (\d+\.\d+);/.test(navigator.userAgent))
                { /* test for MSIE x.x; */
                    var IEversion=new Number(RegExp.$1); /* capture x.x portion and store as a number */
                { /* Not IE or IE version not detected */
                    var IEversion=0;
            if (browserName=="Microsoft Internet Explorer" && IEversion<8)
                { /* IE7 and previous*/
                    var IE7_w=document.documentElement.clientWidth+'';
                    var IE7_h=document.documentElement.clientHeight+'';
                    jQuery(document).ready(function () {
                        SV.simpleviewer.load('sv-container', IE7_w, IE7_h, '101010', true );
                { /* IE8, next IE version, other browser */
                    jQuery(document).ready(function () {
                        SV.simpleviewer.load('sv-container', '100%', '100%', '101010', true );
        <div id="sv-container"></div>

Re: Damn IE7....

Taking help of JavaScript is good. But in these kind of a situation you can write a separate style for IE7 and use it using HTML Conditional comments.

This might be useful -

http://www.w3resource.com/html/iframe/H … lement.php

5 (edited by smallblades 2011-02-28 09:18:51)

Re: Damn IE7....

Oh thanks, the web page that you suggest is very well done.

I know conditional comments for IE, but I don't know the solution of the problem.
At the end I've decided to use the previous script and change style if IE il less or ugual than 7: in those cases I use fixed dimension of main container.

A similar problem is present in Konqueror: the gallery fill the iframe but if you resize the browser it will not auto-resise.

In both case I've decided to use fixed dimension, unfortunatly...