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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:06:31+00:00 2026-06-05T00:06:31+00:00

Basically I want a relative element to hide its absolute child on the z

  • 0

Basically I want a relative element to hide its absolute child on the z plan.

ul {z-index:10; position:relative;}
ul ul {z-index:-10; position:absolute;} 

They are positonned on top of each other.
The first should hide its child, but it’s not happening that way.

See the fiddle. I try to make the red part disappear under the blue one.

Any help muy appreciated

Thank you

  • 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-05T00:06:32+00:00Added an answer on June 5, 2026 at 12:06 am

    The specific thing you’re trying to do can’t be done. By setting a z-index on the parent ul, you cause that element to become a new stacking context, which according to the spec, means that its background and borders will always sit below all of its child elements.

    The effect you want may still be achievable if you remove the z-index setting from the parent ul. This doesn’t mean that you have to adjust the rest of the z-indexes in your page to compensate; all you have to do is provide another element to be the context – for instance, the parent element of the parent ul. To make that element a stacking context, you just have to give it a z-index value – any z-index value, so long as it’s a number.

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

Sidebar

Related Questions

I want to get the position of a an element in its parent. For
I'm trying to specify a relative directory in the web.xml file. I basically want
So Basically I have a <div> which contains two buttons. I want to position
Basically, I want an outer DIV's height to be dictated by its inner DIVs
I want to know if the url is relative or no using javascript. Basically
I basically want something like: TextView Button Button . . . TextView TextView SeekBar
I basically want to setup a relationship similar to Netflix's DVD rental model. There
I basically want to do: git checkout branchA git checkout -b branchB <commit_id> which
I basically want the same functionality as facebook, twitter and all those other infinite
I basically want to do this in code: PersonList myPersonList; //populate myPersonList here, not

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.