Understanding - Cascading Style Sheets Lotech Solutions ( Jump to site home pagewww.lotechsolutions.com)

Understanding sizes in CSS

Topic status automatically displays here - do not remove.

Add me to your favorites!Bookmark this topic  Print me!Print this topic

This topic explores the units of length in CSS, and the differences between absolute and relative measurement.

Note Note

The basic structure of an HTML table is described in Jump across to separate topic Understanding HTML Tables.

Ed: Add links here for other CSS topics.

Back to Top

CSS Length Unit Table

Relative length units
em The height of the element's font.
ex The height of the letter "x".
px Pixels.
% Percentage.
Absolute length units
in Inches (1 inch = 2.54 centimetres).
cm Centimetres.
mm Millimetres.
pt Points (1 point = 1/72 inches).
pc Picas (1 pica = 12 points).


Absolute or Relative

Measurements and positions in Cascading Style Sheets (CSS) properties are indicated in length units. Internet Explorer supports two types of length units: relative and absolute.

A relative length unit specifies a length in relation to another length property. Relative length units scale better from one output device to another, such as from a monitor to a printer.

An absolute length unit specifies an absolute measurement, such as inches or centimetres. Absolute length units are useful when the physical properties of the output device are known.


See Also

Jump to site home page Lotech Solutions' Tips, Tricks, and Procedures

Back to Top