DEV Community

Cover image for Truncating Text with Text-Overflow
SnippFlow
SnippFlow

Posted on

Truncating Text with Text-Overflow

When building websites we often find ourselves in situations where text within an html element goes beyond the available space. To keep things looking nice and readable we can use the css text-overflow property.

See the following Codepen for a demo:

Full article: Truncating Text with Text-Overflow
CSS Snippets

Top comments (0)

MongoDB Atlas runs apps anywhere. Try it now.

MongoDB Atlas runs apps anywhere. Try it now.

MongoDB Atlas lets you build and run modern apps anywhere—across AWS, Azure, and Google Cloud. With availability in 115+ regions, deploy near users, meet compliance, and scale confidently worldwide.

Start Free