如何在中间显示标题,描述和表格?
HTML:
<div class="row clearfix">
<div class="col-md-12 column splash">
<span class="splash-heading">Welcome to PlayMaker</span>
<span class="splash-description">Choose your city so we can tailor the results to your location</span>
<div class="city-chooser">
<div class="ui-widget">
<select id="combobox">
<option value="">Start typing...</option>
{% for city in cities %}
<option value="{{ city }}">{{ city }}</option>
{% endfor %}
</select>
</div>
</div>
</div>
</div>
CSS:
.splash-left {
float:left;
width:50%;
}
.splash-right {
float:left;
width:50%;
padding-top:145px;
}
.splash span {
display: block;
}
.splash-heading {
font-size: 56px;
font-weight: 100;
padding-top: 145px;
color: white;
text-align: center;
}
.splash-description {
font-size: 20px;
font-weight: 100;
color: white;
text-align: center;
}
最佳答案
试试这个:
.splash{
margin: 0 auto;
text-align: center;
display: table;/*force to center*/
}
关于jquery - 在中间对齐div内容,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/22474556/