button tag is not responding ,
It can be found on console.
Color and other properties are working fine
but still it doesn’t show cursor:pointer
property
and clicking it won’t work.
`<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Background slider</title>
<script src="https://kit.fontawesome.com/6036f5d002.js" crossorigin="anonymous"></script>
<link href="styles.css" rel="stylesheet" >
</head>
<body>
<div class="container">
<!-- Start of image -->
<div class="slider" style="background-image: url(../../../images/background-park-wonder-famous-countryside-waterscape.jpg);">
</div>
<!-- End of image -->
<!-- Start of image -->
<div class="slider" style="background-image: url(../../../images/4-47096_cat-wallpaper-background-data-src-free-download-cat.jpg);">
</div>
<!-- End of image -->
<!-- Start of image -->
<div class="slider" style="background-image: url(../../../images/beautiful-autumn-leaves-autumn-red-background-sunny-daylight-horizontal.jpg);">
</div>
<!-- End of image -->
<!-- Start of image -->
<div class="slider" style="background-image: url(../../../images/landscape-tropical-green-forest.jpg);">
</div>
<!-- End of image -->
<!-- Start of image -->
<div class="slider" style="background-image: url(../../../images/beautiful-shot-small-lake-with-wooden-rowboat-focus-breathtaking-clouds-sky.jpg);">
</div>
<!-- End of image -->
**<button class="arrow left" id="left"><i class="fa-solid fa-chevron-left"></i></button>**
** <button class="arrow right" id="right"><i class="fa-solid fa-chevron-right"></i></button>**
</div>
<script src="script.js"></script>
</body>
</html>`
* {
box-sizing: border-box;
}
body {
height: 100vh;
width: 100vw;
margin: 0;
background-position:center center;
background-size: cover;
}
.container {
height: 100vh;
width: 100vw;
position: relative;
background-color: rgba(0, 0, 0 , 0.5);
z-index: -1;
}
.slider {
position: absolute;
top: 15vh;
left: 15vw;
bottom: 15vh;
right: 15vw;
background-position:center center;
background-size: cover;
display: none;
}
.slider.active {
display: block;
}
.arrow {
position: absolute;
top: 50vh;
background-color: transparent;
font-size: 25px;
border: 2px solid orangered;
color: white;
padding: 10px;
cursor: pointer;
}
.arrow:hover {
background-color: orangered;
}
#left {
left: calc(15vw - 40px);
}
#right{
right: calc(15vw - 40px);
}