Выравнивание по вертикали встроенного поля, текста или ячейки таблицы.
Возможные значения
[длина]
Значение: [длина].
Описание: увеличивает (положительное значение) или уменьшает (отрицательное значение) текст / поле. 0 равно базовой линии.
Пример: 5px.
[в процентах]
Значение: [в процентах].
Описание: увеличивает (положительное значение) или уменьшает (отрицательное значение) текст / поле. Вычисляется в зависимости от высоты строки. 0% равно базовой линии, 100% в один раз больше высоты строки и т.д. Пример: 10%
baseline
Значение: baseline.
Описание: выравнивает базовую линию текста / поля с базовой линией содержащего его поля. По умолчанию.
sub
Значение: sub.
Описание: понижает базовую линию до уровня нижнего индекса.
super
Значение: super.
Описание: поднимает базовую линию до уровня надстрочного знака.
top
Значение: top.
Описание: выравнивается по верхней части строки или ячейки таблицы.
text-top
Значение: text-top.
Описание: выравнивается по верхней части текста содержащего поля.
middle
Значение: middle.
Описание: выравнивается по середине текста содержащего поля или по середине ячейки таблицы.
bottom
Значение: bottom.
Описание: выравнивается по нижней части строки или ячейки таблицы.
text-bottom
Значение: text-bottom.
Описание: выравнивается по нижней части текста содержащего поля.
inherit
Значение: inherit.
initial
Значение: initial.
unset
Значение: unset.
Пример
h2 em { font-size: 0.5em; vertical-align: text-top; } td { vertical-align: top; }
Страницы в тему:
- Свойство CSS: line-height
- Свойство CSS: position
- Свойство CSS: top
- Свойство CSS: bottom
Все свойства CSS
all background background-attachment background-clip background-color background-image background-origin background-position background-repeat background-size border border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width border-left border-left-color border-left-style border-left-width border-radius border-right border-right-color border-right-style border-right-width border-spacing border-style border-top border-top-color border-top-left-radius border-top-right-radius border-top-style border-top-width border-width bottom box-shadow caption-side clear clip color content counter-increment counter-reset cursor direction display empty-cells float font font-family font-size font-size-adjust font-stretch font-style font-synthesis font-variant font-weight height left letter-spacing line-height list-style list-style-image list-style-position list-style-type margin margin-bottom margin-left margin-right margin-top max-height max-width min-height min-width opacity orphans outline outline-color outline-style outline-width overflow padding padding-bottom padding-left padding-right padding-top page-break-after page-break-before page-break-inside position quotes right table-layout text-align text-decoration text-decoration-color text-decoration-line text-decoration-style text-indent text-transform top transform transform-origin transition transition-delay transition-duration transition-property transition-timing-function unicode-bidi vertical-align visibility white-space widows width word-spacing z-index