Im building a website with HTML + CSS. and Im trying to use a video as the background of my website. The problem is there is some kind of borther in the left and right of my video.
I have tried using width 100% and height 100%, width and heigh 100vh and 100vw, and min-width and min-height 100% but there is still some remaining space in both left side and right side of the video
.container{
background: rgba(0, 0, 0, 0.9);
text-align: center;
color: white;
font-size: 2em;
display: grid;
grid-template-columns:repeat(12,1fr);
grid-gap: 0;
}
/*Adjust container for Fullscreen Video Background*/
.blue{
grid-column: 1/-1;
height: 100vh;
}
.video{
height: 100vh;
min-width: 100%;
min-height: 100%;
}
.video-overlay{
width: 100%;
height: 100vh;
position: absolute;
top: 0;
left: 0;
background: #000000;
z-index: 0;
opacity: 0.75;
}
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<link rel="stylesheet" href="style.css">
<meta charset="utf-8">
<title></title>
</head>
<body>
<div class="container">
<div class="blue area">
<video width="100%" height="100vh" class="blue video-background" src="highlight.mp4" autoplay muted loop>
</video>
<div class="blue video-overlay"></div>
<nav>
<ul class="navigation sticky">
<li class="arcananame">ARCANA</li>
<li class="choice"><a href="#">Home</a></li>
<li class="choice"><a href="#">About Us</a></li>
<li class="choice"><a href="#">Gallery</a></li>
<li class="choice"><a href="#">Events</a></li>
<li class="choice"><a href="#">Contact Us</a></li>
</ul>
</nav>
<div class="banner title">
<h2 id="banner h1">Welcome to ARCANA</h2>
<h6 id="banner h6">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</h6>
</div>
</div>
<div class="red area">red</div>
<div class="green area">green</div>
<div class="yellow area">yellow</div>
<div class="black area">black</div>
</div>
</body>
</html>
I expected the video will be fullscreen.
bodymargin - setmargin: 0on yourbodyelement... - kukkuz