Выравнивание по низу, похоже, не работает для меня в Bootstrap 4.
Ниже мой код. Я хочу, чтобы текст выровнялся по строке внизу. Я не могу использовать поля/отступы, так как иногда этот текст будет состоять из нескольких строк.
Как я могу вертикально выровнять по низу?
<div style = "height:55px !important;">
<span class = "align-bottom">
This text should align to bottom, closer to the line
</span>
</div>
<div class = "border-top">
Other content below the line
</div>
JSFiddle: https://jsfiddle.net/wqeah67v/





Bootstrap 5 (обновление 2021 г.)
mt-auto или align-self-end по-прежнему можно использовать для выравнивания содержимого по нижнему краю в div flexbox (d-flex).
Bootstrap 4 (оригинальный ответ)
Как объяснил здесь, выравнивание по нижнему краю не работает внутри display:block.
Используйте display table-cell или флексбокс для выравнивания по нижнему краю.
с ячейка таблицы
<div style = "height:55px !important;" class = "align-bottom d-table-cell">
<span>
This text should align to bottom, closer to the line
</span>
</div>
при использовании флексбокс работают автоматические поля. Например, margin-top: auto
<div style = "height:55px !important;" class = "d-flex">
<span class = "mt-auto">
This text should align to bottom, closer to the line
</span>
</div>
или,
<div style = "height:55px !important;" class = "d-flex">
<span class = "align-self-end">
This text should align to bottom, closer to the line
</span>
</div>
<div class = "border-top">
Other content
</div>
Выровнять текст по нижнему краю можно следующим образом:
<div style = "height:55px !important; position: relative;">
<span class = "align-bottom" style = "position: absolute;bottom:0;">
This text should align to bottom, closer to the line
</span>
</div>
<div class = "border-top">
Other content
</div>
Рабочая ссылка jsfiddle: https://jsfiddle.net/ez7rbk1u/