Problem: Multi-Line Clamp in Dynamically Sized Cards
Problem description
Create a row of content cards with variable text lengths. Clamp each card’s description to three lines, ensuring that the cards stay visually aligned despite differing amounts of content.
Goal
Truncate content in each card to three lines, enforcing consistent vertical space while allowing for flexible grid behavior.
Constraints
Use only HTML and CSS.
Grid should wrap based on available space.
Do not use JavaScript or fixed heights.
Sample visual output
Here’s what the output would look like:
Good luck trying the problem! If you’re unsure how to proceed, check the Solution.
Problem: Multi-Line Clamp in Dynamically Sized Cards
Problem description
Create a row of content cards with variable text lengths. Clamp each card’s description to three lines, ensuring that the cards stay visually aligned despite differing amounts of content.
Goal
Truncate content in each card to three lines, enforcing consistent vertical space while allowing for flexible grid behavior.
Constraints
Use only HTML and CSS.
Grid should wrap based on available space.
Do not use JavaScript or fixed heights.
Sample visual output
Here’s what the output would look like:
Good luck trying the problem! If you’re unsure how to proceed, check the Solution.