Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Full Video Background With A Section Below

Featured Replies

Hello Everyone, I hope you're well.

 

I'm trying to make a full video background design with a section below it when you scroll downwards.Using a tutorial, I know how to make the full video background but whenever I try to add a section below it it either stays at the top of the page or margins etc start to glitch and it becomes a mess. I was wondering if anyone could help me out?

HTML

<!DOCTYPE html>
<html>
<head>
<title>Video Background</title>

<meta charset="UTF-8">
<meta name="viewport" content="width-device-width">

<link rel="stylesheet" href="./css/main.css" type="text/css">

</head>
<body>

<div class="background-wrap">
<video id="video-bg-elem" preload="auto" autoplay="true" loop="loop" muted="muted">
<source src="kids.mp4" type="video/mp4">
Video not supported
</video>
</div>


<div class="content">
<h1>header</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vulputate ante massa, eget ultricies nisi accumsan quis. Fusce volutpat turpis vel diam vulputate,</p>
</div>

</body>
</html>

-----------------------------------------------------------------

 

CSS

* {
margin: 0;
padding: 0;
}
body {
font-family: Calibri, sans-serif;
}
.background-wrap {
position: fixed;
z-index: -1000;
width: 100%;
height: 100%;
overflow: hidden;
top: 0;
left: 0;
}

#video-bg-elem {
position: absolute;
top: 0;
left: 0;
min-height: 100%;
min-width: 100%;
}
.content {
position: absolute;
width: 100%;
min-height: 100%;
z-index: 1000;
background-color: rgba(0,0,0,0.7);
}
.content h1 {
text-align: center;
font-size: 65px;
text-transform: uppercase;
font-weight: 300;
color: #fff;
padding-top: 15%;
margin-bottom: 10px;
}
.content p {
text-align: center;
font-size: 20px;
letter-spacing: 3px;
color: #aaa;
}

----------------------------------------------------------------------------

 

 

 

Thank you

 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.