I currently have a screen layout like this
I have to render componene 2 inside component 3 in below way
Due to certain restrictions i cannot put angular component 3 inside angular component 2
so what i have done is to use css to achieve the desired effect
.component3 {
position: relative;
z-index: 1
}
.component2 {
position: absolute;
margin-left: calc(100% - 169px);
margin-top: 13px;
z-index: 2;
}
I have achieved the desired output however once user scrolls page the component 2 keeps showing on page. It is not supposed to scroll
what can i do for it ?


position: sticky. css-tricks.com/position-sticky-2