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

366
Vistas
How to have ellipsis, clamp lines, and have text after ellipsis?

To display movie titles, I would like to have ellipsis, clamp the total number of lines to two, and have the year of the movie behind the ellipsis, such that a movie title like

Eternal Sunshine of the Spotless Mind (2004)

would be displayed like

Eternal Sunshine of
the Spotl... (2004)

when the width is restricted.

This would be straight-forward if it were one line, but I want two.

I have looked around on Stack Overflow, but I couldn't find any way to achieve all three of these. I would prefer a pure CSS solution, as using JavaScript for this seems finicky, but if that's not possible I guess I don't really have a choice.

about 4 years ago · Juan Pablo Isaza
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