Here is a code snippet where I am trying to display "0 of 2 completed" on a new line at full width. I have used flexbox for this purpose, but I am facing challenges. Can you suggest a better approach to achieve this?
.container {
display: flex;
width: 400px;
height: 40px;
border: 1px solid blue;
}
.container > div {
height: 20px;
}
.dragHandle {
flex: 0 0 20px;
background-color: rgba(0,0,0,0.2);
}
.checkbox {
flex: 0 0 30px;
background-color: rgba(0,0,0,0.3);
}
.input {
flex: 0 0 auto;
flex-grow: 1;
background-color: rgba(0,0,0,0.1);
}
.avatar {
flex: 0 0 30px;
background-color: rgba(0,0,0,0.3);
}
.footer {
/* appear on new line */
}
<div class="container">
<div class="dragHandle"></div>
<div class="checkbox"><input type="checkbox" /></div>
<div class="input">Task title</div>
<div class="avatar"></div>
<div class="footer">0 of 2 completed</div>
</div>