Reputation: 769
How do I make a Flex Container Parent Container have its Width Equal to Total Width of Children? Right now my width of Parent is taking whole length of screen. For some reason width 100% is not working. I don't want to manually set the width and height of Parent, but have it automatically configure to whatever can contain child elements.
Upvotes: 0
Views: 872
Reputation: 769
Try display: inline-flex
for the parent instead of display: flex
.parent {
display: inline-flex;
}
Upvotes: 1