Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1086771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:51:16+00:00 2026-05-16T22:51:16+00:00

I’m trying to create a dialog window using the following CSS: #blackOverlay { display:

  • 0

I’m trying to create a dialog window using the following CSS:

#blackOverlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";
    filter: alpha(opacity=80);
    -moz-opacity: 0.8;
    -khtml-opacity: 0.8;
    opacity: 0.8;
    z-index: 1001;
}

#whiteOverlay {
    display: block;
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    z-index:2002;
    overflow: auto;
    background: #c4e982;
}

and the following JS:

var div = $("<div id='blackOverlay'></div");
$("body").prepend(div);

var div = $("<div id='whiteOverlay'></div");
div.html("Loading......");

var u = "myurl?function=example";
div.load(u);
$("body").prepend(div);

This works correctly in Firefox, Safari, Chrome and Opera.

Unfortunately it fails in IE, at least on version 8.0. The color/opacity is only applied to body and NOT on other DIV’s. Instead of “hidding” everything behind the blackOverlay, everything (links, buttons, input fields, …) is still usable although the loaded content is displayed correctly (in front, center of screen).

Any help is appreciated!


Thank you jduren for pointing me in the right direction. After attempting to handle it in similar way as described here I came up with the following workaround:

function shime() {    
    jQuery.each(jQuery.browser, function(i) {
        if($.browser.msie){
            $('div').each(function() {
            $(this).addClass("shine");
            });
        }
    });
}

function unshime() {
    jQuery.each(jQuery.browser, function(i) {
        if($.browser.msie){
            $(".shine").each(function() {
                $(this).removeClass("shine");
            });
        }
    });
}

And the following CSS:

div.shine {
    display: none;
}

I know that it’s not the best solution, but I’m getting tired of running in circles due to IE “features”.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T22:51:17+00:00Added an answer on May 16, 2026 at 10:51 pm

    You need to create what’s called an iFrame shim. IE paints controls over everything that isn’t windowed so you won’t be able to handle this by CSS/HTML hacks alone.

    Here is a quick overview of Iframe Shimming http://www.macridesweb.com/oltest/IframeShim.html

    Also, the Mootools More library includes an iFrame shim Feature http://mootools.net/docs/more/Utilities/IframeShim as do most popular javascript frameworks that create overlayed UI elements.

    This is the IFrame Shim class from mootools more library to give you an idea of what’s involved, don’t use this as it depends on other Mootoosl classes.

    var IframeShim = new Class({
    
        Implements: [Options, Events, Class.Occlude],
    
        options: {
            className: 'iframeShim',
            src: 'javascript:false;document.write("");',
            display: false,
            zIndex: null,
            margin: 0,
            offset: {x: 0, y: 0},
            browsers: (Browser.Engine.trident4 || (Browser.Engine.gecko && !Browser.Engine.gecko19 && Browser.Platform.mac))
        },
    
        property: 'IframeShim',
    
        initialize: function(element, options){
            this.element = document.id(element);
            if (this.occlude()) return this.occluded;
            this.setOptions(options);
            this.makeShim();
            return this;
        },
    
        makeShim: function(){
            if(this.options.browsers){
                var zIndex = this.element.getStyle('zIndex').toInt();
    
                if (!zIndex){
                    zIndex = 1;
                    var pos = this.element.getStyle('position');
                    if (pos == 'static' || !pos) this.element.setStyle('position', 'relative');
                    this.element.setStyle('zIndex', zIndex);
                }
                zIndex = ($chk(this.options.zIndex) && zIndex > this.options.zIndex) ? this.options.zIndex : zIndex - 1;
                if (zIndex < 0) zIndex = 1;
                this.shim = new Element('iframe', {
                    src: this.options.src,
                    scrolling: 'no',
                    frameborder: 0,
                    styles: {
                        zIndex: zIndex,
                        position: 'absolute',
                        border: 'none',
                        filter: 'progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)'
                    },
                    'class': this.options.className
                }).store('IframeShim', this);
                var inject = (function(){
                    this.shim.inject(this.element, 'after');
                    this[this.options.display ? 'show' : 'hide']();
                    this.fireEvent('inject');
                }).bind(this);
                if (!IframeShim.ready) window.addEvent('load', inject);
                else inject();
            } else {
                this.position = this.hide = this.show = this.dispose = $lambda(this);
            }
        },
    
        position: function(){
            if (!IframeShim.ready || !this.shim) return this;
            var size = this.element.measure(function(){ 
                return this.getSize(); 
            });
            if (this.options.margin != undefined){
                size.x = size.x - (this.options.margin * 2);
                size.y = size.y - (this.options.margin * 2);
                this.options.offset.x += this.options.margin;
                this.options.offset.y += this.options.margin;
            }
            this.shim.set({width: size.x, height: size.y}).position({
                relativeTo: this.element,
                offset: this.options.offset
            });
            return this;
        },
    
        hide: function(){
            if (this.shim) this.shim.setStyle('display', 'none');
            return this;
        },
    
        show: function(){
            if (this.shim) this.shim.setStyle('display', 'block');
            return this.position();
        },
    
        dispose: function(){
            if (this.shim) this.shim.dispose();
            return this;
        },
    
        destroy: function(){
            if (this.shim) this.shim.destroy();
            return this;
        }
    
    });
    
    window.addEvent('load', function(){
        IframeShim.ready = true;
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm trying to create an if statement in PHP that prevents a single post
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I am trying to render a haml file in a javascript response like so:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.