Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

98
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda