I need to put 3 columns inside a container. They are supposed to have the same width and evenly distributed. I use flex
for that and it works fine.
In the end I need to insert a collection of "cards" in each column ... Because the number of cards can cause the columns to have a greater height than what can be displayed in the browser, the container (the parent of the columns) has overflow
set to scroll
. So when that happens you can still scroll down to look at the cards that are at the bottom of the column.
I have two problems that I'd like to fix:
1) As soon as I insert a card in the left column, that columns becomes larger than the other two. If I set the column to flex
and set flex-grow
to 0
on the card, it makes no difference. I am not sure why?
EDIT:
I fixed #1 by setting width: 33%;
on .column
.
===========================================================================
2) The left column is not drawn passed the bottom boundary of the browser, even though it contains cards causing the container to potentially overflow. What I want to do is be sure that the column "contains" the cards. How could I achieve that (using flex or not)?
I created a fidle and illustrated this problem with the figure below.