Lea Verou 2/24/2012

Flexible multiline definition lists with 2 lines of CSS 2.1

Read Original

This article presents a clever CSS solution for styling definition lists (<dl>) where each term-definition pair appears on one line. It addresses common problems with traditional methods and demonstrates how to use the :after pseudo-element with escaped unicode characters and white-space: pre to insert line breaks, all using CSS 2.1 without requiring floats, invalid markup, or poor browser support.

Flexible multiline definition lists with 2 lines of CSS 2.1

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

1
ServiceNow and Microsoft Copilot
Marius Sandbu 1 votes
2
The Learning Loop and LLMs
Martin Fowler 1 votes