I am experiencing a challenge with my HTML elements, specifically a parent container div and a child div. When I apply the CSS property left: 100%
to the child div, it extends beyond the boundaries of the parent div. While using right: 0
or CALC can solve the issue, I am determined to achieve this using only left: 100%
without relying on Javascript. Is there a solution to accomplish this?
.parent{
border: 1px solid #000;
height: 500px;
position: relative;
width: 500px;
}
.child{
background: #FF0;
height: 100px;
left: 100%;
position: absolute;
width: 100px;
}