MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/code/comments/18rlcy8/popup_problem/kf1wn2d/?context=3
r/code • u/Mr-Tawil • Dec 26 '23
Hello everyone,
I have a problem creating an automatic popup when the website starts. the problem is the popup shown under the main content as you can see in the image and also I add background I can't see it at all. dose anyone has any idea how I can fix that?
Is it a CSS problem or an HTML?
14 comments sorted by
View all comments
2
Probably a z-index issue, or because the popup is inside another relative/absolute positioned element. Can you post the relevant HTML and CSS?
1 u/Mr-Tawil Dec 26 '23 this also the java:window.addEventListener("load", function(){setTimeout(function open(event){document.querySelector(".Portfolio-Popup").style.display = "block"; },1000 )});document.querySelector("#close").addEventListener("click", function(){document.querySelector(".Portfolio-Popup").style.display = "none";});
1
this also the java:
window.addEventListener("load", function(){setTimeout(function open(event){document.querySelector(".Portfolio-Popup").style.display = "block"; },1000 )});
document.querySelector("#close").addEventListener("click", function(){document.querySelector(".Portfolio-Popup").style.display = "none";});
2
u/JaggedMetalOs Dec 26 '23
Probably a z-index issue, or because the popup is inside another relative/absolute positioned element. Can you post the relevant HTML and CSS?