Div background-color does not extend to child divs

前端 未结 5 1769
不知归路
不知归路 2021-01-28 12:21

I have a container div with several child divs within this. The parent div has a background-color, however, this doesn\'t seem to be extending to the last couple of child divs.

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-28 13:07

    .container {
      display: block;
      max-width: 600px;
      height: 100%;
      margin: 20vh auto;
      padding: 0 3%;
      background-color: white;
      text-align: justify;
    
      overflow: auto;
    }
    

    Your checkout is floating, so it doesn't apply correctly to how the container behaves

提交回复
热议问题