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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:10:58+00:00 2026-06-04T05:10:58+00:00

This might be a more advanced CSS question about z-index : You can see

  • 0

This might be a more advanced CSS question about z-index:

You can see it in http://jsfiddle.net/cPdge/6/

Using the current Firefox, Chrome, Safari, or IE 9, you should see the blue DIV on top of the parent DIV.

How do we make the blue box go under the parent DIV? Note: If the z-index for the parent DIV is removed, then the blue DIV will go under it, but what if the z-index is not removed and remain as 0? Why is a z-index of 0 or no z-index specified make a difference? Usually, none specified is the same as 0.

The code in that page is:

    <div id="box1">
        some content
        <div id="subbox1">blue
        </div>
        <div id="subbox2">orange
        </div>
    </div>​

and CSS:

#box1 { width: 600px; height: 400px; border: 6px dashed orange; 
  position: absolute; top: 100px; left: 100px; background: #ffe; z-index: 0 }

#subbox1 { width: 300px; height: 200px; border: 6px dashed orange; 
  position: absolute; top: 310px; left: 100px; background: #eff; z-index: -10000 }

#subbox2 { width: 300px; height: 200px; border: 6px dashed orange; 
  position: absolute; top: 210px; left: 200px; background: #fc9; z-index: 2000 }
  • 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-04T05:11:01+00:00Added an answer on June 4, 2026 at 5:11 am

    Your negative z-index would work if box1 were not positioned, otherwise the subboxes are in a child stacking context, and cannot be positioned under the parent box.

    http://jsfiddle.net/cPdge/7/

    Why is a z-index of 0 or no z-index specified make a difference?

    The answer to this in on the document I linked to: to create a new stacking context, the element must be both positioned and have a declared z-index (or have opacity less than 1, which is a little weird…).

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

Sidebar

Related Questions

OK. This might be more of a math question but here goes. I have
This might be a simple question, but i can't seem to grasp it. I
I folks. This might be more of a design question but I thought I'd
This is a lot more complicated than it might seem at first. What I
This might be basic question but how do I create a list of lists
This might seam like a strange question but.... public string MyProperty { get {
This might be a simple question but I'm just picking this up so please
This might be a little bit odd question, but Im trying to figure out
This might not be relevant to this site, but hopefully you guys can point
I realize this might be more of a math problem. To draw the lines

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.