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 3230870
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:58:41+00:00 2026-05-17T16:58:41+00:00

I am using the following code to fade out background while showing a popup.

  • 0

I am using the following code to fade out background while showing a popup. This is the div container

Css for the same

#VbackgroundPopup{
display:none;
position:fixed;
_position:absolute; /* hack for internet explorer 6*/
top:0;
left:0;
background:#000000;
border:1px solid #cecece;
z-index:1;
}

When some clicks a div i am showing a popup and greying out background by using the

function GreyoutBackground() {
    $("#VbackgroundPopup").css({
        "background-color": "#000000",
        "filter": "alpha (opacity=70)",
        "filter": "progid:DXImageTransform.Microsoft.Alpha(style=0, opacity=70)",
        "-moz-opacity": "0.7",
        "opacity": "0.7",
        "-khtml-opacity": ".7",
        "zoom": "1"
    });
    $("#VbackgroundPopup").css({ "opacity": "0.6" });
    $("#VbackgroundPopup").show();
}

The above code is working fine in Firefox , but in internet explorer its not working , can someone please tell me what is the issue.
i tried width 100% and height 100% , that also didn’t workout

  • 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-17T16:58:41+00:00Added an answer on May 17, 2026 at 4:58 pm

    This works fine (tested in IE6 too):

    <!DOCTYPE html>
    <html>
    <head>
        <title>Fade</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    </head>
    <body>
    
    <button>Fade in the overlay</button>
    <div id="overlay"></div>
    <style>
    * {
        margin: 0;
        padding: 0;
    }
    html, body {
        height: 100%;
    }
    #overlay {
        background-color: #000000;
        display:none;
        height:100%;
        top: 0;
        left: 0;
        position: fixed;
        _position: absolute;
        width: 100%;
        z-index: 999;
    }
    </style>
    
    <script type="text/javascript">
    jQuery(document).ready(function($){
        $('button').click(function(){
            $('#overlay').fadeTo('slow', 0.5);
        });
    });
    </script>
    
    
    </body>
    </html>
    

    I prefered using fadeTo than css('opacity') because the transition is animated.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the following code to fade in images: <script> $(window).load(function(){ $('.slides_control img').css('display', none');
I have three images and using the following code I have then fade in
I'm using following code but cannot return data from MySQL. This is the output:
I'm using the following code. By clicking on div id=popUpPane , the div and
I am using the following code in my presenting VC to fade in the
I'm using the following code to make a div overlay. If the links login
I'm using the following code to swap <div> contents. It functions properly with the
I am using the following code to show and hide two div positioned absolutely
I am using the following jQuery code to fill my DIV in the ASPX
I am using the following code to fade between images in my menu items

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.