Overlay: highlighted-element and stage-element: z-index in container with fixed position
See original GitHub issueIf I have a div with “position: fixed” as a container and in it an element (e.g. a p element) like
<div style="position: fixed; ..."><p id="selector"></p></div>
and I try to highlight the p inside the div, then the hightlight-stage will overlay the p (and of course the div).
The z-index of the selected element won’t work right, because of the parent-div.
You can see a demo at my site (I also included at first normal examples for test reasons) and in the image below.
The only way I found to fix it with dev tools was putting “z-index: 99999999999” in the div, but thats not a really good solution, if there are multiple elements in the div…
![grafik](https://user-images.githubusercontent.com/4275444/38313093-a7b04cd4-3823-11e8-9421-f57adde616be.png)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:6 (1 by maintainers)
Top Results From Across the Web
How To Create Layout Features with Position and Z-Index in ...
One way to set the placement of an element and how it overlays other elements is with a combination of the position property,...
Read more >How to Use the Z-index to Overlay Elements With CSS
How do you overlay elements with CSS? The z-index property is used to position elements one above the other and it's really simple...
Read more >z-index - CSS-Tricks
The z-index property in CSS controls the vertical stacking order of elements that overlap. As in, which one appears as if it is...
Read more >Everything you want to know about z-index | Medium
In general, an element with a position value other than static (sticky, relative, fixed, absolute) is rendered on top of other statically ...
Read more >Use CSS and z-index to create a page overlay, then place one ...
Basically I make an overlay div by doing position: fixed; z-index: 100; , and let one element shine through it by giving it...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For animate mode, could you recursively walk up the element stack and apply an overlay behind every fixed and lift the fixed element above.
That way the element you need would be hoisted so its visible while recursively hide everything else?
@kamranahmedse , I am also getting the same issue, If I use animate version then I am getting the issue, If I use without animate then it’s working. How to use animated version with the above issues?