0
HTML
Hi, I’m practicing html and made a website/blog. I inserted a header to the website that is fixed but as I scroll down the content can be seen in the background of the header. How can I avoid this when scrolling? https://code.sololearn.com/WxkcdCeQa9kJ/?ref=app
2 Réponses
0
The problem you are facing is much similar to one explained by C. Scheler in this code:
https://code.sololearn.com/WXRjLNQwGZxp/?ref=app
If elements overlap their positions ,By default the one that's after another in markup will be stacked up on previous element.
In order to fix this use z-index property.
setting z-index:1; for `p.position_fixed` in css will solve issue.
Read:
https://css-tricks.com/almanac/properties/z/z-index/
0
thanx!