如何停止浮动左? [英] How can I stop float left?
本文介绍了如何停止浮动左?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有以下代码:
<div style="float: left; width: 100%;">
<label style="float: left;">ABC</label>
<input style="float: left; font-size: 0.5em;" type="button" onclick="addTiny(0,'Question_Text'); return false;" value="▼" title="Editor" />
<input style="float: left; font-size: 0.5em;" type="button" onclick="remTiny(0,'Question_Text'); return false;" value="▲" title="Hide" />
<div class="adm">
<textarea rows="2;" style="width: 100%" class="text-box multi-line mceEditor">
abc
</textarea>
</div>
</div>
我的问题是div类与类adm悬浮在左边,因此在同一行标签和两个输入按钮。
My problem is that the div with class adm floats to the left and so goes on the same line as the label and two input buttons. Is there a way that I can make this shift away from floating?
推荐答案
一个标准的方法是在一个标准的方法之间添加一个清除div两个浮动块级元素:
A standard approach is to add a clearing div between the two floating block level elements:
<div style="clear:both;"></div>
这篇关于如何停止浮动左?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文