DigiNews

Tech Watch by Johan Denoyer

← Back to articles

Better Icon and Label Alignment

Quality: 8/10 Relevance: 9/10

Summary

This article explains how to align icons with wrapped text in list items using CSS. It covers two approaches (icon as HTML element and icon as a pseudo-element) and several layout techniques including flexbox alignment, the lh unit, aspect-ratio, and careful sizing to keep icons aligned as text wraps.

🚀 Service construit par Johan Denoyer