【发布时间】:2014-06-18 21:48:59
【问题描述】:
我在这样的 div 中有一个标题
当我把浏览器变小时,它看起来像这样:
但我希望它看起来像这样:
我该怎么做?
html:
<div class="wrapper">
<h4>ALongText LikeThisOne</h4>
</div>
css:
.wrapper{
border:1px red solid;
height:60px;
}
.wrapper h4{
margin-top: 0;
padding-top: 20px;
text-align: center;
}
jsfiddle:http://jsfiddle.net/4cBxt/
【问题讨论】:
标签: html css responsive-design alignment