Trusted answers to developer questions

flex-wrap

Get Started With Machine Learning

Learn the fundamentals of Machine Learning with this free course. Future-proof your career by adding ML skills to your toolkit — or prepare to land a job in AI or Data Science.

CSS flexbox offers users powerful alignment options. A flex container groups multiple flex items together in order to control their representation.

Among the many properties offered by the flex container, one of the most widely used properties is flex-wrap.

svg viewer

The flex-wrap property defines whether the flex items are forced into a single line or wrapped into multiple lines in case of an overflow. This property accepts three values:

  • nowrap - all flex items are aligned in a single line. This may cause the container to overflow.

Flex items may also shrink in size to avoid container overflow.

  • wrap: flex items are aligned in multiple lines in case of overflow.
  • wrap-reverse: flex items are aligned in multiple lines in case of overflow but i​n the reverse direction of flex-direction.

RELATED TAGS

flex-wrap
flexbox
css
Copyright ©2024 Educative, Inc. All rights reserved
Did you find this helpful?