CSS Lengths

CSS has a wide range of lengths that can be used when setting properties for: border, width, height, margin and padding, just to name a few. We have created a simple little project that will visually show you the differences in the various units that can be used for lengths. Currently we have included in this project, absolute lengths, such as: px, mm, cm, in, pt, pc and relative lengths, such as: em, ex ch and rem.

Absolute Lengths

Size: 1

Relative Lengths

HTML Font-Size: 16px

Body Font-Size: 16px

CSS Length =