Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 140734

Scrollable sticky div alongside container

$
0
0

I have been having issues keeping a sticky div that contains text which is rotated 90 deg inside an adjacent container. I am trying to accomplish what is in the image below.

img of sticky top of container

The issue is that I've tried to align it correctly to stay within the container and scroll correctly but the sticky div which contains text, flows out of its container. See the image below.

img of sticky flowing out of container

/* This is the css*/    
.work-section {
    padding-bottom: 20px;
}

.work-title {
    position: -webkit-sticky;
    position: sticky;
    z-index: 10;
    top: 370px;
    transform: rotate(-90deg);
    width: fit-content;
    left: 80px;
    transform-origin: 0 0 0px;
}

.tt {
    position: relative;
    width: fit-content;
}

.test-img {
    width: 100%;
}

Here is the JSfiddle: https://jsfiddle.net/Ratsuns/mz08oew3/17/


Viewing all articles
Browse latest Browse all 140734

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>