I have been struggling with positioning a sticky image above my navigation bar. Here is the code for the sticky image:
img.sticky {
position: -webkit-sticky;
position: sticky;
top: 0;
width: 200px;
z-index: 1000;
}
<div>
<a href="index.html" rel="home" class="logo logo_image_only">
<img class="sticky" src="assets/img/logo_n.png" alt="">
</a>
</div>
.navbar-area {
position: absolute;
left: 0;
top: 50px;
width: 100%;
height: auto;
z-index: 999;
background-color: transparent;
-webkit-transition: 0.5s;
transition: 0.5s;
}
.navbar-area.is-sticky {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 999;
-webkit-box-shadow: 0 2px 28px 0 rgba(0, 0, 0, 0.09);
box-shadow: 0 2px 28px 0 rgba(0, 0, 0, 0.09);
background-color: #ffffff !important;
-webkit-animation: 500ms ease-in-out 0s normal none 1 running fadeInDown;
animation: 500ms ease-in-out 0s normal none 1 running fadeInDown;
}
.navbar-area.is-sticky .zash-nav .navbar {
-webkit-box-shadow: unset;
box-shadow: unset;
padding-left: 0;
padding-right: 0;
}
.navbar-area.navbar-style-two {
top: 0;
padding-left: 40px;
padding-right: 40px;
}
.navbar-area.navbar-style-two .zash-nav {
background-color: transparent;
}
.navbar-area.navbar-style-two .zash-nav .navbar {
background-color: transparent;
-webkit-box-shadow: unset;
box-shadow: unset;
padding-right: 0;
padding-top: 0;
padding-left: 0;
padding-bottom: 0;
}
However, upon loading the page, the image does not display correctly and affects my navbar layout as shown in this image: https://i.sstatic.net/oWMKc.png. Can someone please help me identify the issue? Thank you in advance.