0

I think a screenshot and a little diagram will speak for themselves. This is what I have: enter image description here

And this is the result I want:

enter image description here

So basically I want to say a div can be this big and if it's bigger then cut it and put the rest in the next raw. Any idea on how to do this simply?

Thank you

Michel
  • 26,600
  • 6
  • 64
  • 69
dkx22
  • 1,103
  • 1
  • 13
  • 25

2 Answers2

1

Use the flexbox in the following way:

flex-flow: column wrap;

This will set the flex-flow into columns, not rows(as in your example), they will align on the cross-axis. Wrap will mean that the elements are allowed to wrap and take up space on a second column.

Kristijan Iliev
  • 4,901
  • 10
  • 28
  • 47
BroDev
  • 582
  • 1
  • 4
  • 14
0

According to the description and to the 'Spanish' column on your schema, you want a newspaper-like layout, with content that overflows on the next column.

CSS3 Column Module is useful for that, and is relatively well supported by browsers, providing you use it with prefixes.

In this fiddle, I have defined a lang block element. By setting a column-width to the langs, we allow the 'lang' to break on multiple columns.

CSS:

.lang {
    -webkit-column-width: 100px;
    -moz-column-width: 100px;
    column-width: 100px;
}
Michel
  • 26,600
  • 6
  • 64
  • 69