How to merge two divs

前端 未结 3 955
别跟我提以往
别跟我提以往 2020-12-11 07:45

I have two divs which should looks like one figure. The problem is with the border of the circular block. See pic. below. css were added below

3条回答
  •  臣服心动
    2020-12-11 07:51

    Use z-index property.

    #nameWidgeteMain, #nameWidgeteMain2 {
      width: 279px;
      height: 400px;
      top: 0px;
      position: absolute;
      background-color: rgb(237,237,237);
      box-shadow: 0 0 20px rgba(0,0,0,0.08)
    }
    
    #nameWidgeteMain2 {
      z-index: -2;
      border: 1px solid #dbe0e3;
    }
    
    .nameWidgeteCloseArea {
      z-index: -1;
      ...
    }
    

    This is not merging but the result is the same.

提交回复
热议问题