Lengths in CSS

If this site has been useful, we’d love your support! Running this site takes time and resources, and every small contribution helps us keep creating valuable content. Consider buying us a coffee to keep things going strong!

We’ve just added a new page to our site, check it out here: http://www.cssportal.com/css-lengths, this page will show you various lengths that can be used in CSS. You’ll also be able to see visually the differences when you alter the size of the lengths.

Currently we have included the following lengths:

Absolute Lengths

  • px
  • mm
  • cm
  • in
  • pt
  • pc

Relative Lengths

  • em
  • ex
  • ch
  • rem

I hope you find this page useful to learn the different lengths that can be used with CSS.

Jump on over to our new page here: CSS Lengths