【发布时间】:2011-02-08 04:05:58
【问题描述】:
我有以下代码:
<div style="height: 120px; background: none repeat scroll 0% 0% rgb(45, 144, 234); color: rgb(255, 255, 255); vertical-align: bottom;">
<div style="vertical-align: bottom; height: 120px;">
<h2 style="vertical-align: bottom; height: 120px;">text</h2>
</div>
</div>
我无法将文本放到嵌套 div 的底部。我不能使用 padding-top 或 margin-top,因为我偶尔会有文本换行。
有人可以给我建议吗?
【问题讨论】:
-
vertical-align 不适用于 DIV
标签: html css vertical-alignment