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

前端 未结 6 1084
野的像风
野的像风 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:46

    Float the #list and #similar the right and add clear: right; to #similar

    Like so:

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

      You might need a wrapper(div) around all of them though that's the same width of the left and right element.

    提交回复
    热议问题