CSS CSS Flexbox Layout Building a Layout with Flexbox Creating a Sticky Footer with Flexbox

How is "flex-grow: 1" working on .row and .row hasn't been defined as a flex box?

At least, I don't see where .row is being defined as a flex box.

2 Answers

Eric Butler
Eric Butler
31,934 Points

flex-grow is a child property, so you should be looking to see if it's parent element is a flex container. Here's a popular guide: https://css-tricks.com/snippets/css/a-guide-to-flexbox/

Steven Parker
Steven Parker
172,196 Points

As Eric pointed out, flex items are child elements of flexboxes. If you look in "flexbox.css" on line 6 you will see where "display: flex" is set on the body element, which is the parent of of the .row's.