CSS CSS Flexbox Layout Flexbox Properties Wrapping Flex Items

Yifang kuo
Yifang kuo
Front End Web Development Techdegree Student 12,376 Points

why i can't wrap my item?

when my height is 100px, my flex-wrap doesn't work. but after i follow the video change to 280px, my item can stay inside the container. I want to know why is that?

here is my code

.container {
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -moz-flex;
  display: -webkit-flex;
  display: flex;

1 Answer

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 88,670 Points

How big is the content inside your element?

It might be a case of too much content for flexbox to manage on element of the smaller height. Otherwise the content will overflow out of its container.