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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:19:23+00:00 2026-06-06T01:19:23+00:00

I want to show a child div (That is within a parent container) above

  • 0

I want to show a child div (That is within a parent container) above a div on the same level of the parent div. I can use jQuery, and CSS to manipulate the z-index. In the example below, I want the Calendar to be position above the gridRight, however with a z-index of 1000 and the gridRight at 2, it still does not show above it. The user is able to drag the Calendar around. How can I do this so Calendar shows above gridRight?

-The elements have the property position: absolute

Here is the basic JSFiddle http://jsfiddle.net/LTRyd/1/

  • I want to be able to move the red square above the green square, all while the black square will still show below the green square.

    <div id="mainContainer" class="mainContainer">
         <div id="grid1" class="grid"> <!--Has to have Z-Index of 1-->
              <div id="Calendar" class="item"></div> <!--Z-Index of 1000-->
    </div>            
    </div>
    <div id="gridLeft" class="gridLeft"></div> <!--Has to have Z-Index of 2-->
    <div id="gridRight" class="gridRight"></div> <!--Has to have Z-Index of 2-->
    
  • 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-06T01:19:25+00:00Added an answer on June 6, 2026 at 1:19 am

    Z-Index only takes effect on positioned elements.

    You will have to alter your CSS to position the elements you want z-indexed:

    #Calendar
    {
      position: relative;
      z-index: 20;
    }
    
    #grid2
    {
      position: relative;
      z-index: 10;
    }
    

    edit:

    “Within a stacking context, child elements are stacked according to the same rules previously explained. Importantly, the z-index values of its child stacking contexts only have meaning in this parent. Stacking contexts are treated atomically as a single unit in the parent stacking context.”

    The stacking context – MDN

    Essentially, stacking is resolved within the parent element. All stacking occurs within the parent, and then that parent’s stacking order is in the context of its other siblings, regardless of the stacking order of the children within it.

    So while Calendar will have a z-index of 1000, that z-index will only apply against the stacking of other children of grid1

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

Sidebar

Related Questions

I can style every 4th 'item' div like so jQuery(.item:nth-child(4n)).addClass(fourth-item); and that works fine,
I want to achieve this effect - that when the parent div is toggled/slides
I'm using Kwicks jQuery plugin for my portfolio. I want to show a child
I have a productVariant object which has child product object. I want to show
I want show annotation view (above one of my pin) after load map. For
I want to show array objects at the same time in different 10 labels.
I have a DIV that has plenty of child DIVs inside of it. What
I trying to have a div with child divs that form 2 or more
I am using an iframe to show the child pages.In that one one particular
I have the following jquery code that allows me to use tabs, to tab

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.