To set a flex container with flex-direction: row and ensure it takes up 100% width, you can do it like in this snippet. With flex-direction: row, the flex items (the children) will be aligned in a row. Adding flex: 1 to the children ensures that they grow and take equal space within the row.
Source code viewer
<style> .row { display: flex; flex-direction: row; /* Makes sure items are aligned horizontally */ } .child { flex: 1; /* Allows the children to take equal width */ } </style> <div class="row"> </div> Programming Language: HTML