Hello, I'm new to html and css and i'm learning through youtube tutorials.
I want to create a website but I'm stuck...
My first page contains 1 video that I use as a background and I want to put a text, a logo (img) and a menu over it, and then 3 images that appear when you scroll down.
When I dont put my three images, i have no problem to display my text and logo over my video-background but then, when I add them the text doesn't appear anymore and can't change the logo size...
I tried different tutorials to find a way to add my text over it but it still doesn't work, can someone help me ?
Here's a part of the HTML:
and CSS:
Thank you (sorry I'm a beginner)
I want to create a website but I'm stuck...
My first page contains 1 video that I use as a background and I want to put a text, a logo (img) and a menu over it, and then 3 images that appear when you scroll down.
When I dont put my three images, i have no problem to display my text and logo over my video-background but then, when I add them the text doesn't appear anymore and can't change the logo size...
I tried different tutorials to find a way to add my text over it but it still doesn't work, can someone help me ?
Here's a part of the HTML:
HTML:
<div class="container">
<div class="section">
<div class="content">
<video src="video-introduction.mp4" muted loop autoplay></video>
</div>
<div class="overlay"></div>
<div class="logo">
<img src="logo.PNG" alt="Logo">
</div>
<p>Web site title</p>
<a href="#"> Nous contacter </a>
</div>
<div class="section">
<div class="content">
</div>
</div>
and CSS:
Code:
.container
{
position: relative;
width: 100%;
height: 100vh;
overflow: auto;
}
.container .section
{
position: relative;
width: 100%;
right: 0;
min-height: 100vh;
justify-content: space-between;
align-items: center;
text-align: center;
}
.container .section .content video
{
position: relative;
top: 0;
left: 0;
width: 100%;
height: 100vh;
object-fit: cover;
z-index: 1;
}
.container .section .content
{
position: absolute;
display: flex;
justify-content: center;
align-items: center;
z-index: 10;
}
.logo img
{
width: 10px;
line-height: 5em;
height: 39vh;
justify-content: center;
align-items: center;
margin-top: 23vh;
}
.container .section .content p
{
font-size: 1.3em;
color: #fff;
padding: 2px 30px;
text-decoration: none;
margin-top: 1vh;
}
.container .section:nth-child(2)
{
background: url(macjauneentier.png);
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed;
background-position: 100% 50%;
}
Thank you (sorry I'm a beginner)