InternetUnicodeHTML CSS NormalizationCSS Reset to DefaultCSS InheritedPropertiesCSS Wrapper Draft for Information Only
ContentCSS Length Dimension
CSS Length Dimensionsources: https://www.w3.org/Style/Examples/007/units.en.html
Dimension of LengthCSS only provides the unit of expression for expressing the dimension length. In general, output media can be divided into soft scalable display and hard fixed printout. Although there are a number of different units can be used, some of them may not be suitable for using in some output media because of the properties of output media. Unit of LengthThe units used for expressing length in CSS are in, cm, mm, pt, pc Absolute UnitAn absolute unit is a hard fixed dimension, that is the dimension used in CSS is the same as everywhere eles. However the accuracy of the output is still highly depending on the resolution of the output media. For example, the output presentation may be different from a low-resolution handheld screen to a high-resolution desktop display. Therefore an absolute unit in CSS is mainly used for high-resolution display or printed output media. Document with absolute unit of hard fixed dimension is not suitable for soft scalable output media to which document with relative unit of soft scalable dimension will work much better. The common absolute units are in, cm, mm, pt, and pc. Therelation between these absolute units is 1in=2.54cm=25.4mm=72pt=6pc. inThe 'in' stands for inch is a unit of length in the imperial/US unit system and is equal to 2.54cm in the metric system. 'in' equal to 25.40mm. cmThe 'cm' stands for centimeter is a unit of length in the metric/SI unit system and is equal to one hundredth of a meter. 'cm' equal to 10.00mm mmThe 'mm' stands for millimeter is a unit of length in the metric/SI unit system and is equal to one thousandth of a meter. 'mm' equal to 1.00mm QThe 'Q' stands for quarter millimeter is the smallest measurement unit of length in CSS and is equal to one quarter of a millimeter. 'Q' equal to 0.25mm ptThe 'pt' stands for point is the smallest measurement unit in typography and is equal to 1/72 of an inch. In order words, 72 points equal to an inch or 12 points equal to a pica. 'pt' equal to 0.35mm pcThe 'pc' stands for pica is a typographic unit in typography and is equal to approximately 1/6 of an inch or 1/72 of a foot. In order words, 6 picas equal to an inch or a pica equals to 12 points. 'pc' equal to 4.23mm Variable UnitA variable unit is an abstract relative unit depending on the output media.The common variable unit is pixel. Pixel is a visual measurement unit in related to the resolution of the output media. The pixel measurement unit is usually not directly refering to the phsical dimension of the device pixel because both pixel resolution and physical dimension of the output media may not be the same. In general, a pixel refers only to a part of a physical visual dot on the output media, and the user agent will rescale the pixel unit to the corresponding value according to the pixel density of the output media by relating either the physical units to their physical measurements, or the pixel unit to the reference pixel. pxThe 'px' stands for pixel is a visual meaurement unit in visual media. A reference pixel is equal to approximately 1/96 of an inch or 0.26mm. In order words, 96 pixels equal to an inch (96dpi) or 100 pixel equals to 26mm. The reference pixel is defined by refering to an accepted standard by placing an output media with a pixel density of 96dpi at a reading distance of 28 inches with visual angle about 0.0213 degrees. Relative UnitA relative unit is a dimenionless measurement unit with reference to an assigned absolute reference unit. In other word, the user agent will rescale the relative unit to the corresponding value refering to the assigned absolute reference unit accordingly. The common relative units are em, ex, and rem. emThe 'em' unit is a font-relative length unit with reference to the font-size of the current element, that is the width of the capital letter M. Font sizes are inherited by elements from their parents. exThe 'ex' unit is a font-relative length unit with reference to the x-height of the current element, that is the height of the lower case letter x. Font sizes are inherited by elements from their parents. chThe 'ch' unit is a font-relative length unit with referenece to the 0-width of the current element, that is the width of the number 0 (U+0030). Font sizes are inherited by elements from their parents. icThe 'ic' unit is a font-relative length unit with referenece to the 水-width of the current element, that is the width of the number 水 (U+6C34). Font sizes are inherited by elements from their parents. capThe 'cap' unit is a font-relative length unit with referenece to the nominal capitalletter height of the current element, that is the nominal height of capital letters. Font sizes are inherited by elements from their parents. %The '%' unit stands for percentag and is a dimensionless ratio unit with reference to the one hundredth of the value of the current element, that is 1/100 of the value of the current element. remThe 'rem' unit stands for root em and is a font-relative length unit with reference to the font-size of the root base element of the document, that is the width of a capital letter M. Besides 'rem' always refer to the font-size of the base font-size only, and will ignore any inherited font sizes. lhThe 'lh' unit is a element-relative length unit with referenece to the line height of the current element. rlhThe 'rlh' unit stands for root lh and is a element-relative length unit with referenece to the line height of the root element as in rem. vwThe 'vw' unit is a viewport-relative length unit with referenece to the one hundredth width of the viewport, that is the 1/100 of viewport width (inline axis). vhThe 'vh' unit is a viewport-relative length unit with referenece to the one hundredth height of the viewport, that is the 1/100 of viewport height (block axis). vminThe 'vmin' unit is a viewport-relative length unit with referenece to the one hundredth of the smaller dimension of the viewport, that is the 1/100 of viewport's smaller dimension. vmaxThe 'vmax' unit is a viewport-relative length unit with referenece to the one hundredth of the larger dimension of the viewport, that is the 1/100 of viewport's larger dimension. UnitlessSometime unitless numeric values can also be used in CSS as a genetic unit with value of one unit of the corresponding unit.
HTML Document Input:
Code Input: ©sideway ID: 181202702 Last Updated: 12/27/2018 Revision: 0 Ref: ![]() References
![]() Latest Updated Links
![]() ![]() ![]() ![]() ![]() |
![]() Home 5 Business Management HBR 3 Information Recreation Hobbies 8 Culture Chinese 1097 English 339 Travel 18 Reference 79 Computer Hardware 254 Software Application 213 Digitization 37 Latex 52 Manim 205 KB 1 Numeric 19 Programming Web 289 Unicode 504 HTML 66 CSS 65 SVG 46 ASP.NET 270 OS 431 DeskTop 7 Python 72 Knowledge Mathematics Formulas 8 Set 1 Logic 1 Algebra 84 Number Theory 206 Trigonometry 31 Geometry 34 Calculus 67 Engineering Tables 8 Mechanical Rigid Bodies Statics 92 Dynamics 37 Fluid 5 Control Acoustics 19 Natural Sciences Matter 1 Electric 27 Biology 1 |
Copyright © 2000-2025 Sideway . All rights reserved Disclaimers last modified on 06 September 2019