Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

97
Views
How to make same height cards with same height content elements

I have cards with a title, a short description and a button.

Now I don't only want to have just the whole card in same height as the other cards around it, but also having all titles, all descriptions and all buttons to have the same height.

I can't get it to work. Making all cards the same height with flexbox is pretty easy, but getting all parts to have the same height is not.

E.g. for the title I can't just make it a fixed height because the titles have dynamic length and it could be some cards have a single line while others have multiple.

Any ideas how I could do this easily?

Edit: Here is some code I already have (simlpyfied, of course) https://codesandbox.io/s/stoic-snowflake-z6n1h?file=/index.html

I thought about a solution similar to this angular directive plugin, hoping it could be accomplished without the use of JS. Also I don't use angular in the project where I need this.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You could try to design the cards to accommodate a certain size of content and then you can make use of overflow:hidden; text-overflow: ellipsis; CSS properties to trim the extra long values down. You could also impliment some hard limits in your back end or editing system to force users to be creative.

From a UX point of view you could also consider adding buttons or hover states that allows a user to see an expanded view.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!