{"id":375815,"date":"2024-06-03T12:22:02","date_gmt":"2024-06-03T19:22:02","guid":{"rendered":"https:\/\/css-tricks.com\/?p=375815"},"modified":"2024-06-18T16:40:40","modified_gmt":"2024-06-18T23:40:40","slug":"css-length-units","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/css-length-units\/","title":{"rendered":"CSS Length Units"},"content":{"rendered":"\n
Many CSS properties accept numbers as values. Sometimes those are whole numbers. Sometimes they’re decimals and fractions. Other times, they’re percentages. Whatever they are, the unit that follows a number determines the number’s computed length<\/a>. And by “length” we mean any sort of distance that can be described as a number, such as the physical dimensions of an element, a measure of time, geometric angles… all kinds of things!<\/p>\n\n\n\n At the time of this writing, the CSS Values and Units Module Level 4 specification<\/a> defines a bunch of different CSS units \u2014 and many of those are relatively<\/em> new (this pun will make sense later).<\/p>\n<\/div>\n\n\n\nQuick Reference<\/h2>\n\n\n
\n Absolute units <\/summary>\n \n\n