display:table-cell not working on button element

前端 未结 1 1727
小鲜肉
小鲜肉 2021-01-20 23:19

I\'m trying to style a sort of command bar. It must work in IE9, so flexbox is out. Instead, I\'m using a display:table layout.

The first snippet (using

1条回答
  •  醉梦人生
    2021-01-21 00:11

    The problem is that the

The idea is to maintain a level of common sense when styling HTML elements. For instance, the rule prevents authors from turning a fieldset into a table.

However, there is an easy workaround in this case:

Solution 1: Wrap each

OR

Solution 2: Use another element to submit the form data.

Note that some browser versions may actually accept a display change on a

0 讨论(0)
提交回复
热议问题