i found interesting feature, but cant find why it happens. So: We have fixed position element, which second under body. First element have styles
.firstEl {
width:100%;
height:200px;
background-color:green;
}
Second element have
.fixedEl {
position:fixed;
right:0;
height:100px;
width:50px;
background-color:red;
}
Where do you think will be fixed element positioning by top? It`s intresting behavior when js change height of first element and our fixed container change his position too. https://jsfiddle.net/titusja/ue715fuk/
P.S. If someone can help to find why it happens(i mean documentation of this behavior) i`ll be very greatfull