How can I stop float left?

后端 未结 10 620
野趣味
野趣味 2021-01-31 01:13

I have the following code:

相关标签:
10条回答
  • 2021-01-31 01:19

    A standard approach is to add a clearing div between the two floating block level elements:

    <div style="clear:both;"></div>
    
    0 讨论(0)
  • 2021-01-31 01:21

    There's a class in bootstrap for it

    class="clearfix";

    0 讨论(0)
  • 2021-01-31 01:26

    add style="clear:both;" to the "adm" div.

    0 讨论(0)
  • 2021-01-31 01:27

    Sometimes clear will not work. Use float: none as an override

    0 讨论(0)
  • 2021-01-31 01:30

    Okay I just realized the answer is to remove the first float left from the first DIV. Don't know why I didn't see that before.

    0 讨论(0)
  • 2021-01-31 01:32

    You could modify .adm and add

    .adm{
     clear:both;
    }
    

    That should make it move to a new line

    0 讨论(0)
提交回复
热议问题