Split Div Into 2 Columns Using CSS

后端 未结 14 1850
故里飘歌
故里飘歌 2020-11-29 18:01

I have been attempting to split a div into two columns using CSS, but I have not managed to get it working yet. My basic structure is as follows:

14条回答
  •  执笔经年
    2020-11-29 18:51

    Another way to do this is to add overflow:hidden; to the parent element of the floated elements.

    overflow:hidden will make the element grow to fit in floated elements.

    This way, it can all be done in css rather than adding another html element.

提交回复
热议问题