Частный вебмастер Услуги Контакты Справочная информация Статьи и публикации Полезные сервисы Букварь вебмастера
   Букварь вебмастера

Атрибут vertical-align

vertical-align Attribute

{ vertical-align: baseline| sub | super | top | text-top | middle | bottom | text-bottom | <percentage>}

The property affects the vertical positioning of the element.

This attribute is not inherited.


One set of keywords is relative to the parent element:

  • baseline

  • middle

  • sub

  • super

  • text-top

  • text-bottom

Another set of properties are relative to the formatted line that the element is a part of:

  • top

  • bottom

Using the 'top' and 'bottom' alignment, unsolvable situations can occur where element dependencies form a loop.

Percentage values refer to the 'line-height' of the element itself. E.g., a value of '-100%' will lower the element to where the baseline of the next line should have been.

The 'first-letter' pseudo-element has a special interpretation of a negative value on 'vertical-align': the letter is "dropped" into the element.


SPAN.subscript { vertical-align: sub }

Смотрите далее: visibility »

  Атрибуты CSS