Percentages as Values


Many properties that accept a number or a length as a value also accept a percentage, such as 50%, 33.3%, and 100%. Although not a unit of measure, percentages offer similar advantages that relative units do; that is, they automatically scale.

What the percentage is a percentage of that is, what it is relative to depends on the property. Usually, it is a percentage of the value that the property has in the parent element. For example, an H1 with a font size of 80% means the font is 80 percent of the font size of its parent (often, the BODY element).



Cascading Style Sheets(c) Designing for the Web
Cascading Style Sheets: Designing for the Web (3rd Edition)
ISBN: 0321193121
EAN: 2147483647
Year: 2003
Pages: 215

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net