Popup Overflow Horizontally
I am not able to provide screenshots or code currently.
To summarise, I was making a simple popup window for a website for their Privacy Policy.
I put everything into proper dividers and used JavaScript for a darker background, etc.
The issue is, I had some very long <p> HTML elements and they took a whole line creating a horizontal scroll. I obviously do not want this, it would be ideal if everything fit vertically and the user only had to scroll vertically.
ChatGPT came with some prompts suggesting to use overflow-x/y and word-wrap but nothing I pasted really worked properly?
If somebody could briefly explain how to proceed in this scenario and what should I do that'd be helpful for me to retake on this task in a few days when I'm back on my PC
6 Replies
Please make a minimum reproduction on codepen so we can see what the issue is. Right now we can't help besides give vague suggestions since you've not given anything beyond "it doesn't work". And without seeing the code we can't help make it work.
The HTML:
The JavaScript:
and the CSS:
Inside section id="notice" are the long <p>'s I talked about
and this is the horizontal scroll I was talking about

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
you have set
white-space: nowrap;
on the p element this will force that long paragraph to be on one lineWow, 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.
Thanks a lot đź‘Ť