[英]Multiple select option text standing under the checkbox in materialize.css
In the example you see below, the text (Faculty not selected) stands under the checkbox, i didn't get any special features when i checked the attributes from style palette. 在下面看到的示例中,文本(未选择“教员”)位于复选框下方,当我从样式调色板中检查属性时,我没有任何特殊功能。 Normally text should be near the checkbox. 通常,文本应在复选框旁边。 Any idea about the problem? 对这个问题有任何想法吗?
<div class="container">
<div class="row">
<form class="col s12">
<div class="row mt50">
<div class="input-field col s3">
<select class="validate faculty" name="faculty" id="faculty" onchange="getCourse();">
<option value="">Choose</option>
<option value="FEng">Faculty of Engineering</option>
<option value="FMed">Faculty of Medicine</option>
<option value="FSci">Faculty of Science</option>
</select>
<label for="faculty">Faculty</label>
</div>
<div class="input-field col s4">
<select name="course" id="course" multiple>
<option value="" disabled>Faculty not selected</option>
<select/>
<label for="course">Course</label>
</div>
</div>
</form>
</div>
</div>
You just need to add either display:inline or display:flex on #course. 您只需要在#course上添加display:inline或display:flex。 Something is probably making the checkbox display:block by default. 默认情况下,复选框可能显示为display:block。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.