CSS GUIDE LINE HEIGHT

From CDOT Wiki
Revision as of 21:33, 14 December 2006 by Dmmanley (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This document is a work in progress and is subject to change.

Summary

The line-height property specifies the height of an in-line element box.

Applicability:The line-height property can be used for all CSS elements.
Media Group: Visual
Inherited:Yes

Syntax

TARGET_ELEMENT { line-height: value }

Legal Values

Values can be entered in 4 ways:

MethodExample
normalSets set the computed value to a "reasonable" value based on the font size of the element
lengthThe box height is set to this length.
numberThe box height is set to this number multiplied by the element's font size.
percentageThe box height is set to this percentage multiplied by the element's computed font size.

See usage examples section for more details.

Mozilla Recommended Values

Usage Examples

TARGET_ELEMENT { line-height: 1.2; font-size: 10pt }     /* number */
TARGET_ELEMENT { line-height: 1.2em; font-size: 10pt }   /* length */
TARGET_ELEMENT { line-height: 120%; font-size: 10pt }    /* percentage */

Notes

The World Wide Web Consortium (W3C) provides a free online CSS validation service.

Specification Conformance

Browser Compatibility

See Also

Back to CSS Index