我在页面上有过滤下拉列表,我需要“显示:内联”。有一个h2,标签,选择。我的问题是,如果我将它们全部设置为显示:内联,则select会显示在select的顶部,因为宽度设置为100%(在Foundation 4中的某个位置)。我希望select使用容器元素内部剩余100%的空间。我错过了什么......
<div class="blog-filter-selection">
<div class="row">
<h2 class="large-3 small-12 columns">Filter By:</h2>
<div class="topic-filter large-4 small-12 columns">
<label>Topic:</label>
<select onchange="document.location.href=this.options[this.selectedIndex].value;" name="tag-dropdown">
<div class="company-filter large-5 small-12 columns">
<label></label>
<select></select>
</div></div>
那么,如何将select设置为div.topic-filter内部剩余空间的100%?
SASS
div.blog-filter-selection{
h2{
color: $primary-color;
font-weight: 600;
font-size: emCalc(24);
display: inline;
}
div.topic-filter, div.company-filter{
display: inline;
}
div.topic-filter label, div.company-filter label{
font-size: emCalc(16);
font-family: $header-font-family;
font-weight: $header-font-weight;
float: left;
}
div.topic-filter select, div.company-filter select{
margin-bottom: 0;
padding: 0;
float: left;
}
}
浏览器结果