CSS flex-flow Property

If this site has been useful, we’d love your support! Running this site takes time and resources, and every small contribution helps us keep creating valuable content. Consider buying us a coffee to keep things going strong!

Description

The flex-flow property allows you to specify flex-direction property values ​​in a single declaration (sets the direction in which the flex elements are located inside the flex container), and flex-wrap (determines whether the flex container will be single-line or multi-line). Before using the flex-flow property in work, I recommend that you familiarize yourself with the listed properties individually.

Initial value
See individual properties
Applies to
Flex containers
Inherited
No
Computed value
See individual properties
Animatable
No
JavaScript syntax
object.style.flexFlow

Interactive Demo

Item 1
Item 2
Item 3
Item 4
Item 5
Item 6

Syntax

flex-flow: flex-direction || flex-wrap

Values

Example

<h3>flex-flow: row nowrap;</h3> 
<div class="container"><div>A</div><div>B</div><div>C</div></div>
<h3>flex-flow: row-reverse wrap-reverse;</h3>
<div class="container2"><div>A</div><div>B</div><div>C</div></div>
<h3>flex-flow: row-reverse wrap;</h3>
<div class="container3"><div>A</div><div>B</div><div>C</div></div>
.container {
   display: -webkit-flex; 
   display: flex; 
   -webkit-flex-flow: wrap-reverse;
   flex-flow: row nowrap;
}
.container2 {
   display: -webkit-flex;
   display: flex; 
   -webkit-flex-flow: wrap-reverse;
   flex-flow: row-reverse wrap-reverse; 
} 
.container3 {
   display: -webkit-flex;
   display: flex;
   -webkit-flex-flow: wrap-reverse;
   flex-flow: row-reverse wrap;
} 
div>div {
   width: 40%;
   height: 25px; 
   border: 1px solid orange; 
   background: white;
} 

Browser Support

The following table will show you the current browser support for the CSS flex-flow property.

Desktop
Edge Chrome Firefox Opera Safari
12292812.19
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview
292812.1924.4

Last updated by CSSPortal on: 1st January 2024