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

  • SEARCH
  • Home
  • 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 8472631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:07:46+00:00 2026-06-10T17:07:46+00:00

I have two layer,one is black overlay: #overlay { background: rgba(0,0,0,0.7); width: 100%; height:

  • 0

I have two layer,one is black overlay:

#overlay {
    background: rgba(0,0,0,0.7);
    width: 100%;
    height: 100%;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 0;
    display: none;
} 

the other is my text container:

#wrap {
    z-index: 999
    width:600px;
    height:600px;
    border:5px solid black;
    display:none;
    color:red;
}

I want let the overlay and the container show at the same time:

$(document).click(function () {
    $('#overlay').add('#wrap').fadeIn();
})​​

but the text container is always under the overlay,although I have set the overlay z-index to 0 and set the container z-index to 999.

Demo is here

finally I found I have to set the overlay z-index to -1, it would work.

Why I can not set the overlay’s z-index more higher?Because its position is fixed?

  • 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-06-10T17:07:48+00:00Added an answer on June 10, 2026 at 5:07 pm

    z-index is not applied to #wrap because it has flow positioning. A box must have at least position: relative; before z-index takes effect.

    Also, your z-index value is missing its semicolon. Make it z-index: 999; and it works. My code is below:

    #wrap {
        z-index: 999;
        width:600px;
        height:600px;
        border:5px solid black;
        background: #FFF;
        display:none;
        color:red;
        position: relative; }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

say I have two 'modules'. For instance the hardware-interface layer of a RS-232 port
I have two layers being drawn. A static background texture and a texture(png) with
Have two actionsheet buttons and one modalviewcontroller on mainviewcontroller in application. Now for two
I have two classes (MVC view model) which inherits from one abstract base class.
So I'm designing a myspace page and I have two images, one is a
I have two panels: one that is always visible and another that gets declared
In the code below I have two Canvas layers one text and one image,
I have two methods using the EF4 - one which returns a list of
I have two virtual directories, one hosts an application the other hosts a web
I have a UITabBarController that contains two view controllers. One is the default view

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.