Answer the question
In order to leave comments, you need to log in
How to put content in a column using Flexbox?
An example is here - https://jsfiddle.net/29yyyz2y/
There is a Flexbox container with limited height. Conventionally 150px;
The container contains a number of Flexbox elements of different heights. These elements are built in reverse order.
Why does the layout in the example break?
If you disable the property display: flex;
on the container, then everything is fine, but then the internal elements do not go in reverse order.
If you disable the property display: flex
for inner elements, then everything is fine too, but then the date is not where it should be.
If you set the minimum width on the inner elements, then the elements where there is little text are wider than expected.
How to get out of the situation?
Answer the question
In order to leave comments, you need to log in
if you want the effect to reverse the entries in a limited container with a scrollbar, you can put the flex container in a regular block, set it to a minimum height and overflow:auto:
.news {
max-height: 150px;
overflow: auto;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question