Open main menu

CDOT Wiki β

CSS GUIDE LINE HEIGHT

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

Specification Conformance

Browser Compatibility

See Also