Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

99
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda