.headline {
text-wrap: balance;
}
Built with by Lazar Dragos George. The content may not be distributed without my permission.
5 February 2025
We've all seen it: headlines with awkward line breaks, where a single word dangles alone, breaking the visual flow of your design. It's not just aesthetically displeasing-it impacts readability and user experience.
This new CSS property solves typography headaches with one simple line of code.
.headline {
text-wrap: balance;
}
Default vs Balanced Titles
- Use sparingly on short, critical text elements
- Combine with max-width for best results
- Test across different screen sizes
-
1.
2.
Typography just got easier. Happy coding!
Built with by Lazar Dragos George. The content may not be distributed without my permission.