0

I got some cards that should show a trailer of a website taking the title and a excerpt from that given website. The bottom grey background is a parent div with display: flex on it. I've set the container to height: 200px and the child elements should fit inside.

Because the title and text can vary from site to site i would like to make them fit as best as possible with just one CSS class.

So, when a title is shorter and only takes up one line, I would like to add one line to the excerpt field.

Is there any way to make that happen with CSS? can display: flex handle this? I've tried to use flex-grow but it doesn't work

Preview of the example

koloml
  • 525
  • 2
  • 15
BIKERSAN
  • 1
  • 2
  • Please post your code, an image is not enough! – cloned Jun 08 '22 at 08:46
  • Does [this](https://stackoverflow.com/a/71969934/17684809) answer your question ? – Cédric Jun 08 '22 at 08:50
  • just a suggestion, you can wrap your title and text in another div, make it `display: flex;` as well, `flex-direction: column;` and `justify-content: space-between;` you may need to play with height or overflow property of this div as well. If you would've provided your code sample, it would be much easier and sensible to help you out. – Arslan Shahab Jun 08 '22 at 09:11
  • Please provide enough code so others can better understand or reproduce the problem. – Community Jun 08 '22 at 13:45

0 Answers0