【发布时间】:2017-04-18 23:44:12
【问题描述】:
我有一个带有单独按钮的下拉列表,只有改变字体改变了父框的高度。
select的高度为50px,如果我保留默认字体大小,则父div的高度为50px。
但是如果我改变字体的大小,父div的大小等于50px + 在控制台找不到几个px,结果是select和button不在同一行
你对问题有什么想法吗?
<section class="central_row">
<select name="name" id="list_name">
<option value="an option">an option</option>
</select>
<button type="button" class="next-select"><i class="fa fa-arrow-right" aria-hidden="true"></i></button>
</section>
select {
width: 250px;
height: 50px;
border: none;
background: #1b997a;
color: white;
border-radius: 4px;
font-size: 25px;
margin-right: 30px;
padding-left: 14px;
}
button.next-select {
height: 50px;
width: 50px;
border: none;
margin-bottom: 0px;
box-sizing: border-box;
}
【问题讨论】:
标签: html css select fonts height