I am trying to have a horizontal scrolling page and want the scroll to be 75% of my viewport and vertically aligned. But for some reason the div doesn't get aligned vertically. I tried doing margin left, right, top and bottom but resulted in my code acting unexpectedly. Even I tried using "display flex" but didn't work at all.
<div class="main_background">
<div class="wrapper">
<div class="slide one"></div>
<div class="slide two"></div>
<div class="slide three"></div>
<div class="slide four"></div>
</div>
</div>
and my CSS file...
.slide{
width: 100vw;
height: 80vh;
}
.wrapper{
display: flex;
flex-direction: row;
width: 300vw;
transform: rotate(90deg) translateY(-100vh);
transform-origin:top left;
margin-top: 90px;
}
.one{
background-color: orchid;
}
.two{
background-color: orangered;
}
.three{
background-color: pink;
}
.four{
background-color: green;
}
.main_background{
width: 100vh;
height: 100vw;
background-image: linear-gradient(green, greenyellow);
transform: rotate(-90deg) translateX(-100vh);
transform-origin:top left;
overflow-y: scroll;
overflow-x: hidden;
position: absolute;
}
It would be greatly helpful if someone can help me with this! Thanks
