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

361
Views
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
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!