.profile { display: flex; } .avatar { flex-shrink: 0; }The avatar keeps its width while text uses the remaining space.
LESSON 58 OF 100
Keep the avatar size when text needs space.
flex-shrink defines how much an item’s main size can be reduced when the line lacks space. A value of 0 excludes the avatar from negative free-space distribution.
.profile { display: flex; } .avatar { flex-shrink: 0; }The avatar keeps its width while text uses the remaining space.
.profile { display: flex; } .avatar { flex-shrink: 1; }A value of 1 lets the avatar shrink with the other items.
Enable Flexbox on the profile and prevent the avatar from shrinking.
The flex container resolves available space, and flex-shrink: 0 preserves the avatar’s main size.
ANALYSIS REQUEST
The initial discussion is without obligation. You receive an honest recommendation, suitable stages and the factors that affect price.