Skip to content
Sign upLog in
← Back to Community

H E L P

Profile icon
zain-haq

w3schools told me to do this to have a video background but now I cant scroll. WHat i want is the video will be in background looped but I have a div in the center that you can scroll down:

/* Style the video: 100% width and height to cover the entire window */ #myVideo { position: fixed; right: 0; bottom: 0; min-width: 100%; min-height: 100%; } /* Add some content at the bottom of the video/page */ .content { position: fixed; bottom: 0; background: rgba(0, 0, 0, 0.5); color: #f1f1f1; width: 100%; padding: 20px; }
Answered by 19wintersp [earned 5 cycles]
View Answer
Voters
Profile icon
JokinCadinanos
Profile icon
zain-haq
Comments
hotnewtop
Profile icon
19wintersp

.content doesn't need to be position: fixed, in fact, that's causing the problem. If you remove that, it will scroll.

Profile icon
19wintersp

I also suggest adding z-index: -1 to #myVideo, and changing the overflow: scroll on body to overflow-y: scroll.

Profile icon
zain-haq

AAAAAAA TYYYYYYYYYYYYYYYYYYYYYYYYYYYY

@19wintersp

Profile icon
RYANTADIPARTHI

if you have a video, you can't scroll. It's stuck like that.