r9young / DECO7140-Final-Project

0 stars 0 forks source link

FexBox Example - flex-flow: row wrap - main { flex: 3 0px; } #9

Open r9young opened 5 months ago

r9young commented 5 months ago

flex-grow: 3, the item will grow proportionally to three times the size of other flex items with a grow value of 1.

The .wrapper > * rule applies flex: 1 100% to all immediate children of the .wrapper class, meaning:

This results in each child normally occupying 100% of the parent container's width, so they stack vertically.

However, the .main class is explicitly set to flex: 3 0px; within a media query:

Final Outcome

The .main item will take up significantly more space than the other flex items (specifically, three times more space) due to its higher flex-grow value. This makes .main the dominant element when there's room for expansion.