我有一个带有标签的文本输入,旁边我放置一个按钮来执行除提交输入和按钮所在的表单之外的其他操作.我将输入(带标签)放在a中twelve wide field,按钮位于four wide field:
<div class="two fields">
<div class="twelve wide field">
<label for="postalCodeMain">Postcode</label>
<input type="text" id="postalCodeMain" value=""/>
</div>
<div class="four wide field">
<div class="ui fluid bottom button" onclick="getLocations('Main');">Search for Address</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
问题是按钮浮动到顶部,four wide field因为输入上方有标签,什么是使按钮与输入内联的最佳方法?
我已经尝试了很多方法,但是将标签放在字段之外会导致标签和输入之间的间隙过大,并且在按钮顶部添加一个空标签会让我感到浪费......?
以下是我在JSFiddle上尝试过的方法.
我错过了按钮div的课程吗?
ann*_*use 12
好吧我把我变得愚蠢,在阅读完文档之后,我发现这很简单:
<div class="field">
<label for="postalCode05">Postcode</label>
<div class="ui action input">
<input type="text" id="postalCode05" placeholder=""/>
<button class="ui button">Search</button>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
我更新的JSFiddle中的示例