Search code examples
javascripthtmlcssz-indexfixed

How to get a default positioned element go under a fixed element while scrolling?


I want the form element group to go down under the fixed element while scrolling but it isn't happening . When i scroll down , i'm expecting the fixed positioned element covers the element going up but instead it is covering as if it were a transparent element and getting mixed with the element going up. Help . Here is the Link : https://codepen.io/tanveer_nihal/pen/xxZqNXw

 <https://codepen.io/tanveer_nihal/pen/xxZqNXw>

Solution

  • set this to your #header in css

    background-color: white;
    

    You think that it's not working because the you don't set any background so it's transparent. If you add a background-color you will see this.