-
daveporter
Hi everyone,
I am using the setting of ‘auto’ – margin top to ensure the last block in a flex based layout all line up.
But if the last block is in a container with other blocks it does not work.
E.g. a card has:
Image
Title
Container with date, details, author & button
This container is set to flex, but auto on the top margin does not work.
How do I configure that to work ?
My play area linked is working through Kyle @ TAB latest blog video!
TIA, Dave -
Hi Dave,
the parent container of the container needs to be set to
display:flex, flex-direction: columns, justify-content: space-between
. -
daveporter
Thanks Ying,
No joy with that suggestion I’m afraid.
The parent container of the inner container is the Post Template block, I tried that using your settings and that didn’t work. The image, title, excerpt and button are just spread out (vertically) so the titles don’t line up!I also tried it’s parent container, but no luck there either.
This is a play site, if you need access let me know…
Cheers, Dave -
1. Set the
blog-card
container to display:flex, flex-direction:columns.2. Set the parent container of the read more to flex-grow:1.
-
daveporter
Yes! Working now, thanks so much…
An interesting observation – each row (of 3 on desktop) are all the same height, but they vary from row to row, I assume depending on the amount of maximum content.
How would I make them all the same height ?
Note: The post template block is set to 100% height!Dave
-
Then you need to set a
min-height
for the parent container of the text, eg. 350px, the value needs to be greater than or equal to the tallest container.
- You must be logged in to reply to this topic.