I have 2 divs and using flex:
.parent {
display: flex;
flex-direction: column;
align-items: center;
background: red;
}
.item {
height: 40px;
margin-bottom: 10px;
}
<div class="parent">
<div class="item">something here</div>
</div>
My issue is that the parent is 100% the width of the screen.
How can I make it so it stay's as large as the item content, so auto grows (when there's more text is grows or shrinks with less)?