CSS: Why is vertical-align: baseline stop working on Firefox when using overflow: hidden?

后端 未结 3 1982
野趣味
野趣味 2021-02-07 17:33

You can reproduce this by running this test case. The results are shown in the screenshot below. The issue is that on Firefox, when adding a overflow: hidden on the

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-07 18:27

    try

    .label {
            float: left;
            line-height: 30px;
            margin-right: 5px;
            }
    

    this will get the desired result in both FF and Chrome/Safari. Did not test in IE however.

提交回复
热议问题