How to place div side by side

前端 未结 7 1913
时光说笑
时光说笑 2020-11-22 15:47

I have a main wrapper div that is set 100% width. Inside that i would like to have two divs, one that is fixed width and the other that fills the rest of the space. How do i

7条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-22 16:45

    Give the first div float: left; and a fixed width, and give the second div width: 100%; and float: left;. That should do the trick. If you want to place items below it you need a clear: both; on the item you want to place below it.

提交回复
热议问题