How to force div to appear below not next to another?

前端 未结 6 1085
野的像风
野的像风 2021-01-30 12:07

I would like to place my div below the list, but actually it is placed next to the list.The list is generated dynamically, so it doesn\'t have a fixed hight. I would like to hav

6条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-30 12:50

    use clear:left; or clear:both in your css.

    #map { float:left; width:700px; height:500px; }
     #list { float:left; width:200px; background:#eee; list-style:none; padding:0; }
     #similar { float:left; width:200px; background:#000; clear:both; } 
    
    
    
      this text should be below, not next to ul.

    提交回复
    热议问题