How to place div side by side

前端 未结 7 1885
时光说笑
时光说笑 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:44

    I don't know much about HTML and CSS design strategies, but if you're looking for something simple and that will fit the screen automatically (as I am) I believe the most straight forward solution is to make the divs behave as words in a paragraph. Try specifying display: inline-block

    Content in column A
    Content in column B

    You might or might not need to specify the width of the DIVs

提交回复
热议问题