Percentage Values

A percentage value is expressed as a <number> followed immediately by a percent sign (%). There should never be any space between the number and the percent sign. A percentage value will always be computed relative to something else. For example, declaring font-size: 120%; for an element sets its font size to 120% of the computed font-size of its parent element. Some properties may restrict the values to be non-negative.

Get CSS Pocket Reference, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.