row | row-reverse | column | column-reverse
nowrap | wrap | wrap-reverse
flex-start | flex-end | center | space-between | space-around
display: flex;
Box One
Example text here.
Box Two
Much longer text in this box. You will notice how the size of this box is taking up more
space than the first box. It is behaving similarly to a table, and much easier than using
CSS properties to fake a table (display: table
).
.fixedItem { flex-basis: 250px; flex-shrink: 0; }
Box One
Example text here. Much longer text in this box. You will notice how the size of this box is taking up more
space than the first box. It is behaving similarly to a table, and much easier than using
CSS properties to fake a table (display: table
).
Box Two
Much longer text in this box. You will notice how the size of this box is taking up more space than the first box. It is behaving similarly to a table.
.flexContainer { display: flex; justify-content: space-between; }
Boxes will try to fit on a single line, but will wrap as the browser window get narrower.
.flex { flex-wrap: wrap; } .flexItem { width: 50%; min-width: 350px; }