M
M
mrSeller2019-05-04 08:26:53
css
mrSeller, 2019-05-04 08:26:53

How to make two columns on flexbox?

Good, the task is to make two columns with "book" content - ie. content from the first column, if there is not enough height, is transferred to the second column.
I threw my current progress

The height is fixed, if the content does not fit, a scroll should appear.
But along with the scroll, for some reason, there are three columns.
If this is not possible on flexbox, then how can this be implemented?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey delphinpro, 2019-05-04
@delphinpro

It seems to be elementary, on columns (which are intended for this)

D
Dima Polos, 2019-05-04
@dimovich85

It seems this:
htmlbook.ru/css/columns

P
Polina Emelyanova, 2019-05-04
@bugo_aneo

Hello.))
On scroll: there will be no scroll until you give the limited height part a wrapper with overflow: hidden;.
Put it on the bodysuit - and here is your scroll.
By columns.
You have no width restrictions on the parent. So why can't flex with column direction, with limited height, give you a 3rd, 4th, or at least a 10th column?
Give the parent max-width equal to 2 widths of your columns in the layout, and columns - 50% with paddings and margins. It's like an option.
And yes, you can still use columns, but in your case there may be a problem with cutting blocks in height. Then you need to give the descendants an inline-block display.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question