baseline-shift property

Sets or retrieves a value that indicates how the dominant baseline should be repositioned relative to the dominant baseline of the parent text content element.

Scalable Vector Graphics: Text, Section 10.9.2Internet Explorer 9

Syntax

baseline-shift: baseline | sub | super | <percentage> | <length>

Property values

baseline

Default. There is no baseline shift; the dominant baseline remains in its original position.

sub

The dominant baseline is shifted to the default position for subscripts. The offset to this position is determined by using the font data for the nominal font.

super

The dominant baseline is shifted to the default position for superscripts. The offset to this position is determined by using the font data for the nominal font.

percentage

The computed value of the property is this percentage multiplied by the computed line-height of the text element. The dominant baseline is shifted in the shift-direction (positive value) or opposite to the shift-direction (negative value) of the parent text by the computed value. A value of 0% is equivalent to baseline.

length

The dominant baseline is shifted in the shift-direction (positive value) or opposite to the shift-direction (negative value) of the parent text content element by the length value. A value of 0cm is equivalent to baseline.

CSS information

Applies To‘tspan’, ‘tref’, ‘altGlyph’, ‘textPath’ elements
Mediavisual
Inheritedno
Initial Valuebaseline

Standards information

Remarks

The baseline-shift property allows repositioning of the dominant baseline relative to the dominant baseline of the parent text content element. The shifted object might be a subscript or superscript. Within the shifted object, the whole baseline table is offset; not just a single baseline. The amount of the shift is determined by one of the following:

  • the parent text content element
  • the subscript or superscript offset from the nominal font of the parent text content element
  • the percent of the line-height of the parent text content element
  • an absolute value.

See also

CSSStyleDeclaration
currentStyle
style
SVGTextPathElement
SVGTSpanElement
dominantBaseline

 

 

Show:
© 2014 Microsoft