MeiFTW
MeiFTW
KPCKevin Powell - Community
Created by MeiFTW on 3/29/2025 in #front-end
Popup Overflow Horizontally
Thanks a lot 👍
10 replies
KPCKevin Powell - Community
Created by MeiFTW on 3/29/2025 in #front-end
Popup Overflow Horizontally
Wow, to think that it was that simple. Thank you, I alternatively found another solution which would be just placing the entire "policy-popup" element just outisde of the footer and have it below or w/e.
10 replies
KPCKevin Powell - Community
Created by MeiFTW on 3/29/2025 in #front-end
Popup Overflow Horizontally
Update: https://codepen.io/Xun149029/pen/QwWZzxz I replicated the code in CodePen, interestingly enough removing the CSS of my footer solves the issue... but I kind of need the Footer to have this style
10 replies
KPCKevin Powell - Community
Created by MeiFTW on 3/29/2025 in #front-end
Popup Overflow Horizontally
No description
10 replies
KPCKevin Powell - Community
Created by MeiFTW on 3/29/2025 in #front-end
Popup Overflow Horizontally
Inside section id="notice" are the long <p>'s I talked about
10 replies
KPCKevin Powell - Community
Created by MeiFTW on 3/29/2025 in #front-end
Popup Overflow Horizontally
and the CSS:
.popup-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 99;
justify-content: center;
align-items: center;
}

.popup-overlay.active {
display: flex;
}

.popup-content {
background-color: white;
padding: 20px;
width: 75%;
height: 80%;
overflow: hidden;
overflow-x: hidden;
position: relative;
border-radius: 8px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.popup-scrollable-content {
height: 100%;
overflow-y: auto;
padding-right: 20px;
word-wrap: break-word;
word-break: break-word;
white-space: normal;
}

p {
word-wrap: break-word;
word-break: break-word;
white-space: normal;
}

.close {
position: absolute;
top: 10px;
right: 10px;
font-size: 40px;
background: none;
border: none;
color: var(--wine);
cursor: pointer;
}
.popup-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 99;
justify-content: center;
align-items: center;
}

.popup-overlay.active {
display: flex;
}

.popup-content {
background-color: white;
padding: 20px;
width: 75%;
height: 80%;
overflow: hidden;
overflow-x: hidden;
position: relative;
border-radius: 8px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.popup-scrollable-content {
height: 100%;
overflow-y: auto;
padding-right: 20px;
word-wrap: break-word;
word-break: break-word;
white-space: normal;
}

p {
word-wrap: break-word;
word-break: break-word;
white-space: normal;
}

.close {
position: absolute;
top: 10px;
right: 10px;
font-size: 40px;
background: none;
border: none;
color: var(--wine);
cursor: pointer;
}
10 replies
KPCKevin Powell - Community
Created by MeiFTW on 3/29/2025 in #front-end
Popup Overflow Horizontally
The HTML:
<footer>
<div id="footer-content">
<p><a class="link" href="#" id="open-policy"><span class="bold">PolĂ­tica de Privacidad</span></a></p> |
<div id="policy-popup" class="popup-overlay">
<div class="popup-content">
<button class="close" id="close-popup">&times;</button>
<div class="popup-scrollable-content">
<section id="notice">
</section>
</div>
</div>
</div>
</div>
</footer>
<footer>
<div id="footer-content">
<p><a class="link" href="#" id="open-policy"><span class="bold">PolĂ­tica de Privacidad</span></a></p> |
<div id="policy-popup" class="popup-overlay">
<div class="popup-content">
<button class="close" id="close-popup">&times;</button>
<div class="popup-scrollable-content">
<section id="notice">
</section>
</div>
</div>
</div>
</div>
</footer>
The JavaScript:
const openPolicyBtn = document.getElementById('open-policy');
const closePopupBtn = document.getElementById('close-popup');
const policyPopup = document.getElementById('policy-popup');

// Open popup when link is clicked
openPolicyBtn.addEventListener('click', function (event) {
event.preventDefault(); // Prevent default link behavior
policyPopup.style.display = 'flex'; // Show the popup
});

// Close popup when the 'X' button is clicked
closePopupBtn.addEventListener('click', function () {
policyPopup.style.display = 'none'; // Hide the popup
});

// Optional: Close the popup when clicking anywhere outside the content
policyPopup.addEventListener('click', function (event) {
if (event.target === policyPopup) { // Check if the clicked area is the overlay
policyPopup.style.display = 'none';
}
});
const openPolicyBtn = document.getElementById('open-policy');
const closePopupBtn = document.getElementById('close-popup');
const policyPopup = document.getElementById('policy-popup');

// Open popup when link is clicked
openPolicyBtn.addEventListener('click', function (event) {
event.preventDefault(); // Prevent default link behavior
policyPopup.style.display = 'flex'; // Show the popup
});

// Close popup when the 'X' button is clicked
closePopupBtn.addEventListener('click', function () {
policyPopup.style.display = 'none'; // Hide the popup
});

// Optional: Close the popup when clicking anywhere outside the content
policyPopup.addEventListener('click', function (event) {
if (event.target === policyPopup) { // Check if the clicked area is the overlay
policyPopup.style.display = 'none';
}
});
10 replies
KPCKevin Powell - Community
Created by MeiFTW on 4/25/2024 in #front-end
Display certain li elements in a single row
Yeah... it certainly is weird, it is true that this is basically a responsive navbar that's inheriting stuff so maybe that's what's causing it.
12 replies
KPCKevin Powell - Community
Created by MeiFTW on 4/25/2024 in #front-end
Display certain li elements in a single row
Just kinda frustrated as it felt like I was close to finishing but I don't mind starting from scratch trying another thing
12 replies
KPCKevin Powell - Community
Created by MeiFTW on 4/25/2024 in #front-end
Display certain li elements in a single row
Tried pasting the code, it still shows up like in the screenshot. Do you think I should use another display method, then?
12 replies
KPCKevin Powell - Community
Created by MeiFTW on 4/25/2024 in #front-end
Display certain li elements in a single row
also had to manually insert a height value in ":hover .menu" as auto or fit-content didn't work
12 replies
KPCKevin Powell - Community
Created by MeiFTW on 4/25/2024 in #front-end
Display certain li elements in a single row
Grid is what gave me the most similar result to what I wanted, trying block or flex ended up in a weird layout. Not sure about how creating more divs would be a plausible solution, though.
12 replies