Unable to use gradient image on background slider

Z

Zak

Guest
I have two issues that I can't seem to solve. The first thing is I'm trying to use a gradient image on my background slider but it doesn't work. I have tried a lot of solutions from here but nothing seems to work. Please check this gif I made.
.

Another issue is with the logo. As you can see from the gif, half of it is missing. I am using bootstrap grid system to separate the sidebar and the background slider. I can solve it by using margin but it ruins the responsiveness.

This is the code I have been using:

HTML

<div class="container-fluid">
<div class="row">
<div class="col-sm-2 col-md-2 col-lg-2 col-xl-2">
<div class="nav-sidebar">
<div id="logo">
<div class="logo">
<img src="https://i.ibb.co/RQGBXjK/logo.png">
</div>
</div>
</div>
</div>
<div class="col-sm-10 col-md-10 col-lg-10 col-xl-10">
<div class="main-content gradient">

</div>
</div>
</div>
</div>


CSS

body {
-webkit-font-smoothing: antialiased;
font-smoothing: antialiased;
margin: 0;
padding: 0;
overflow: hidden;
box-sizing: content-box;
background: transparent;
}


.container{
background: transparent;
width: 100vw;
height: 100vh;
}

.nav-sidebar {
height: 100vh;
margin: 0;
padding: 0;
background-color: grey;
background: linear-gradient(0deg,rgba(0,0,0,1),rgba(0,0,0,0.5)),url(https://i.ibb.co/1TBvfyP/1.jpg);
border-right: 1px solid #000;
box-shadow: inset 0px 5px 30px rgba(0,0,0,0.9),
0px 10px 15px 5px #000;
z-index: 9999;
}

#logo {
height:130px;
width:100%;
}


.nav-sidebar #logo .logo {
width: 100%;
height: 100px;
margin: 0 auto;
}

.logo img{
width: 70px;
height: 70px;
-webkit-filter: drop-shadow(5px 10px 1px #000);
filter: drop-shadow(5px 10px 2px #000);
}

.main-content{
height: 100vh;
background: black;
}


.gradient {
background-image: linear-gradient(rgba(0,0,0,0.9),rgba(0,0,0,0.9)),url(https://i.ibb.co/8KSjNdL/gradient.png);
background-blend-mode: overlay;
width:100%;
z-index:9999;
}

.main-content{
background-position: top 50px center;
background-repeat: no-repeat;
-moz-background-size: cover;
-webkit-background-size: cover;
-o-background-size: cover;
background-size: cover;
}


For full code please check this codepen: https://codepen.io/zakero/pen/JjjjZMz The logo issue seems to be working in codepen but in my browser its as it is shown in the gif.

Continue reading...
 
Top