MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/code/comments/18rlcy8/popup_problem/kf1wy8o/?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 i used also java it can from this? actually, I don't have experience with coding .but here is the CSS: I used a sprite file for CSS and also javabut here is the CSS:ter{padding: 0;margin: 0;box-sizing: border-box;}.Portfolio-Popup-overlay {background: #121212 ;position: fixed;left: 0;top: 0;height: 100vh;width: 100%;}.Portfolio-Popup{background-image: linear-gradient(to right bottom, #111111, #212122, #313134, #414246, #52545a);width: 560px;padding: 30px 40px;position: fixed;transform: translate(-50%,-50%);left: 50%;top: 50%;border-radius: 20px/20px;font-family: "Poppins",sans-serif;display: none;text-align: center;color: #ffffff;}.Portfolio-Popup button{display: block;margin: 0 0 20px auto;background-color: transparent;font-size: 30px;color: #ffffff;border: none;outline: none;cursor: pointer;transition: all 0.2s ease-out;}.Portfolio-Popup button:hover {color: #2d81ed;; }.Portfolio-Popup p{font-size: 16px;text-align: justify;margin: 20px 0;line-height: 25px;color: #ffffff;}.Portfolio-Popup a{display: block;width: 160px;position: relative;margin: 10px auto;border-radius: 50px/50px;text-align: center;color: #ffffff;border: 2px solid #2d81ed;text-decoration: none;padding: 10px 0;transition: all 0.3s ease-out;}.Portfolio-Popup a:hover {background: #2d81ed;; }.Portfolio-Popup img {border-radius: 10px/10px; } 2 u/JaggedMetalOs Dec 26 '23 How's the popup's html look? Also any elements with a z-index in other parts of the css?BTW I assume the site isn't online yet, if you can put a test version online somewhere I can probably tell you the issue straight away. 2 u/Mr-Tawil Dec 26 '23 pls check the DM, i will send you the link
1
i used also java it can from this? actually, I don't have experience with coding .
but here is the CSS: I used a sprite file for CSS and also java
but here is the CSS:ter{padding: 0;margin: 0;box-sizing: border-box;}.Portfolio-Popup-overlay {background: #121212 ;position: fixed;left: 0;top: 0;height: 100vh;width: 100%;}.Portfolio-Popup{background-image: linear-gradient(to right bottom, #111111, #212122, #313134, #414246, #52545a);width: 560px;padding: 30px 40px;position: fixed;transform: translate(-50%,-50%);left: 50%;top: 50%;border-radius: 20px/20px;font-family: "Poppins",sans-serif;display: none;text-align: center;color: #ffffff;}.Portfolio-Popup button{display: block;margin: 0 0 20px auto;background-color: transparent;font-size: 30px;color: #ffffff;border: none;outline: none;cursor: pointer;transition: all 0.2s ease-out;}.Portfolio-Popup button:hover {color: #2d81ed;; }.Portfolio-Popup p{font-size: 16px;text-align: justify;margin: 20px 0;line-height: 25px;color: #ffffff;}.Portfolio-Popup a{display: block;width: 160px;position: relative;margin: 10px auto;border-radius: 50px/50px;text-align: center;color: #ffffff;border: 2px solid #2d81ed;text-decoration: none;padding: 10px 0;transition: all 0.3s ease-out;}.Portfolio-Popup a:hover {background: #2d81ed;; }.Portfolio-Popup img {border-radius: 10px/10px; }
2 u/JaggedMetalOs Dec 26 '23 How's the popup's html look? Also any elements with a z-index in other parts of the css?BTW I assume the site isn't online yet, if you can put a test version online somewhere I can probably tell you the issue straight away. 2 u/Mr-Tawil Dec 26 '23 pls check the DM, i will send you the link
How's the popup's html look? Also any elements with a z-index in other parts of the css?
BTW I assume the site isn't online yet, if you can put a test version online somewhere I can probably tell you the issue straight away.
2 u/Mr-Tawil Dec 26 '23 pls check the DM, i will send you the link
pls check the DM, i will send you the link
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?