I am trying to use fit-content for my flexbox container's width. However, it only covers one column of it's contents and not the rest.
p {
margin-right:10px;
}
.container {
display: flex;
flex-direction: column;
flex-wrap: wrap;
align-content: flex-start;
height: 100px;
background-color: red;
width:fit-content;
}
* {
box-sizing: border-box;
padding: 0;
margin: 0;
}
<div class="container">
<p>apple</p>
<p>apple</p>
<p>apple</p>
<p>apple</p>
<p>apple</p>
<p>apple</p>
<p>apple</p>
</div>
texttexttexttexttexttexttexttext