I have a flex container with a picture and text beside it. This container is centered on the page. When I shrink the page causing the text to word-wrap, the container no longer looks centered because the text div doesn't shrink down to the size of the word wrapped text.
Is it possible to shrink the text div when word wrap occurs?
See JSFiddle here.
It might be tough to see what I'm talking about with the snippet because you might not be able to shrink the page enough to see the wrap happen. Better off looking at the jsfiddle.
.container,
.content {
display: flex;
justify-content: center;
}
.picture {
height: 130px;
width: 130px;
background-color: blue;
}
.text {
display: flex;
flex-direction: column;
justify-content: center;
margin-left: 10px;
}
.name {
font-size: 22px;
}
<div class="container">
<div class="content">
<div class="picture"></div>
<div class="text">
<div class="name">John Jacobjingleheimer</div>
</div>
</div>
</div>