Flex elements ignore percent padding in Firefox

后端 未结 4 733
悲哀的现实
悲哀的现实 2020-12-01 10:40

I\'m trying to add padding to an element inside a display:flex element. When the padding is defined as a percent, it doesn\'t display in Firefox, though it does

4条回答
  •  Happy的楠姐
    2020-12-01 10:49

    For me this does the trick: adding display: table to the div. Don't know if that causes other problems though.

        div {
            background: #233540;
            display: table;
        }
        div > div {
            color: #80A1B6;
        }
        .parent {
            display: flex;
        }
        .padded {
            padding-bottom: 10%;
        }
        
    asdf

提交回复
热议问题