Working with Units

When defining measurements - such as lengths, sizes, position of elements, dimensions, etc, there are a number of different "units of measurement" that can be used

pixelsA pixel (px) is a single "dot" on a computer screen. A screen size of 800x600 will have 800 columns and 600 rows of pixels (480,000 pixels in total)
%Percentage. Percentage values are always relative to another value, such as the dimensions of the parent container. For example, a Horizontal Bar with a width of "100%" placed directly in the "BODY" of an HTML page will expand to fill 100% of the BODY width. A similar bar, with width of "100%", placed inside a TABLE, which in turn only has a width of "500px" will expand to fill 100% of the width of the table (500 pixels)
mmMillimetre (1/100 centimetre)
cmCentimetre (100 millimetres)
inches1 inch is equal to 2.54 centimetres
points1 point (pt) is the same as 1/72 inch
pica1 pica (pc) is the same as 12 points
em1 em is equal to the current font size of the current element
ex1 ex is the x-height of a font (x-height is usually about half the font-size)

These units of measurement should be immediately proceeded by a numeric value, for example "50%", "27pt". Also, decimal numbers are permitted, such as "1.5em". Note, there are no spaces between the value and the unit

Next Topic: Working with URLS >