I'm learning CSS and my content placement does not reach desired result. As see in picture, inserted text leaves border if it's too long. My idea is to keep it within div border as well as place the button at the far right side on the div container after the text.
.result {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.todo-list-wrapper {
display: inline-block;
border: solid 1px #3772ff;
padding: 0.5rem;
border-radius: 0.5rem;
}
li {
list-style: none;
font-family: $font;
letter-spacing: 0.8px;
color: #080708;
justify-content: center;
text-align: center;
}
.done {
justify-items: center;
align-content: center;
left: 26rem;
padding: 0.25rem 0.5rem 0.25rem 0.5rem;
background: #fdca40;
border: none;
border-radius: 0.5rem;
cursor: pointer;
}
<div class="result">
<div class="todo-list-wrapper">
<ul>
<li>{{ todo }}<button class="done">done</button></li>
</ul>
</div>
</div>