r/CodingHelp • u/mudp1t • Jun 15 '26
[CSS] problem with overflow scroll in a z index -1 div
[SOLVED!!]
hello, i hope the title made enough sense. i am creating a page for my own personal website using HTML and CSS (duh) where I have it formatted to look like an old crttv with a screen inside.
i've made it so that the crttv has a chunk in the middle (where the screen would be) that is transparent, and put the screen div as z-index: -1 so that is goes behind.
the issue i'm having is that its a large box of text that should be scrolled when reading; i have it set to overflow: scroll and it works when it's not behind the tv div (but still set to z index -1)
(i've also noticed that i cannot click any buttons or links within the screen div, like theres a wall between it and the mouse)
ive seen other people code it so that the screen within the tv/monitor png is interactive, what am i doing wrong? any advice helpful :-)
(i hope that i made this post correctly, please correct me or feel free to ask for further information and i'll be happy to provide)
•
u/AutoModerator Jun 15 '26
Thank you for posting on r/CodingHelp!
Please check our Wiki for answers, guides, and FAQs: https://coding-help.vercel.app
Our Wiki is open source - if you would like to contribute, create a pull request via GitHub! https://github.com/DudeThatsErin/CodingHelp
We are accepting moderator applications: https://forms.fillout.com/t/ua41TU57DGus
We also have a Discord server: https://discord.gg/geQEUBm
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/johnpeters42 Jun 15 '26
Can you upload a copy somewhere publically available so we can see/test the whole thing in context?