2 divs in a larger div must equal the same height… but how?

后端 未结 4 1688
余生分开走
余生分开走 2020-12-21 22:11

So here is a picture:

\"enter

What the problem is that I have 2 divs in a cont

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-21 22:58

    HTML

    First Div content goes here
    Second Div content goes here

    CSS

    .wrapper {
            width: 960px;
            overflow: hidden;
            margin: 0px auto;
        }
    
        .child_1, .child_2 {
            padding-bottom: 9999em;
            margin-bottom: -9999em;
            width: 50%;
            float: left;
        }
    
        .child_1 {
            background: #f00;
        }
    
        .child_2 {
            background: #0f0;
        }
    

提交回复
热议问题