В представленной вами HTML-структуре элемент .icon
не является внутри элемента .container
.Так что это не может быть связано с этим.Если вы измените структуру и дадите элемент .container
position: relative
, он будет работать.
.root {
display: inline-flex;
background-color: red;
}
.content {
display: flex;
align-items: centerl;
justify-content: centerl;
height: 80px;
width: 100%;
background-color: red;
position: relative;
}
.icon {
position: absolute;
right: 0;
bottom:0;
background-color: yellow;
}
<div class="root">
<div class="content">
content
<div class="icon">
icon
</div>
</div>
</div>