CSS - Absolute Measurement Units


CSS - Absolute Unit

  • The absolute length units are settled and a length communicated in any of these will show up as correctly that size. The absolute units are

Centimeter (cm):

Represents a measurement in centimeters.

Example:

div {margin-bottom: 2cm;}

Inches(in):

Represents a measurement in inches.

Example:

p {word-spacing: .15in;}

Millimeter (mm):

Represents a measurement in millimeters.

Example:

p {word-spacing: 15mm;}

Picas(pc):

Represents a measurement in picas. 1 pica= 12 points.

Example:

p {font-size: 20pc;}

Points(pt):

Represents a measurement in points. 1 point =1/72nd of an inch.

Example:

body {font-size: 18pt;}

Pixel(px):

Represents a measurement in screen pixels.

Example:

 p {padding: 25px;}