How to get these two divs side-by-side?

前端 未结 8 933
無奈伤痛
無奈伤痛 2020-11-27 14:28

I have two divs that are not nested, one below the other. They are both within one parent div, and this parent div repeats itself. So essentially:

8条回答
  •  北海茫月
    2020-11-27 15:21

    Using flexbox it is super simple!

    #parent_div_1, #parent_div_2, #parent_div_3 {
        display: flex;
    }
    

    Fiddle example

提交回复
热议问题