0

I want to realise this effect on website Link of video

my HTML code:

<!DOCTYPE html>
 
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="style.css">
<title>Resto</title>
<link rel="icon" href="favicon/logoB.ico">
</head>
 
<body>
   <main class="container">
 
<nav class="menu">
 
 <a href="#">Burger</a> 
 <a href="#">Sandwich</a> 
 <a href="#">Chawarma</a> 
<a href="#">Salades</a> 
 <a href="#">BBQ</a> 
 <a href="#">Boissons</a> 
 
</nav>

<div class="central" dir="ltr">
<div class="logo">
    <img src="images/logoB.png" alt="Logo">
</div>
 
    <p class="text">Decouvrer des Saveurs exquises</p>
 
<div class="pictures">
    <img src="images/burger.jpg" alt="Hamburger">
</div>
 
</div>
 
   </main>
 
   <footer>
   <p>&copy;*Copyright*****Chez MED***2023</p> 
   <p><img src="images/loc.png"  class="localisation" alt="Adresse">2152 ** Boulevard des ULYSSES</p>
   </footer>
</body>
</html>

my css:

.container{
    position: relative;
    z-index: 1;
    box-shadow: 0 2rem 4rem #f3ebe0;
 
}
 
footer{
    position:sticky;
    bottom: 0;
    padding: 15vmin 2rem;
 
background-image:url("images/fries.jpg");
background-repeat: no-repeat;
background-size: cover;
}

the result is

my page

My footer

the problem is my footer is visible under the body

can I get some idea to fix this problem?

I try to add an effect on my first page the footer should be under the main content who get the z-index

TylerH
  • 20,799
  • 66
  • 75
  • 101
pat66
  • 1
  • 1

0 Answers0