Split Div Into 2 Columns Using CSS

后端 未结 14 1754
故里飘歌
故里飘歌 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:58

    This is best answered here Question 211383

    These days, any self-respecting person should be using the stated "micro-clearfix" approach of clearing floats.

    0 讨论(0)
  • 2020-11-29 19:03

    I know this post is old, but if any of you still looking for a simpler solution.

    #container .left,
    #container .right {
        display: inline-block;
    }
    
    #container .left {
        width: 20%;
        float: left;
    }
    #container .right {
        width: 80%;
        float: right;
    }
    
    0 讨论(0)
提交回复
热议问题