What are CSS units?
CSS units define measurements for properties like width, height, font-size, margins. Two main types: absolute and relative. Absolute units (px, pt, cm) stay fixed. Relative units (rem, em, %, vh) scale based on context.
Most common ones? Pixels (px) for precise control, rem for scalable typography, percentages for flexible layouts, viewport units (vh/vw) for full-screen stuff. Each has its place—there's no one-size-fits-all.
Modern responsive design leans on relative units. They adapt to user preferences (like font size settings) and different screen sizes. Mix and match based on your needs—maybe px for borders, rem for text, % for layouts.