I'm currently working on a project and have this pen which is just a snippet of it. In this snippet, I am trying to hide a div when it gets transformed off to the left. The elements involved are .fixed-strip
for hiding overflowed content and .strip
as the element to be hidden. However, whenever I apply overflow: hidden;
or overflow-x: hidden;
to .fixed-strip
, it hides all content instead of just the transformed one.
.fixed-strip{
max-width: 20rem;
padding-left: 1.5rem;
padding-right: 1.5rem;
margin-left: auto;
margin-right: auto;
position: relative;
}
.strip {
display: block;
background-color: fade_out(rgba(122, 116, 97, 1),0.6);
left: 0;
top: 1rem;
width:300px;
height:80px;
position: absolute;
transition: transform .5s ease-in-out;
z-index: 1000;
}
The entire header needs to be within a container with position:fixed;
for other reasons. Could this possibly be causing the problem?